Lines Matching defs:FormatStyle
53 /// The ``FormatStyle`` is used to configure the formatting to follow
55 struct FormatStyle {
5198 bool operator==(const FormatStyle &R) const {
5387 std::optional<FormatStyle> GetLanguageStyle(LanguageKind Language) const;
5389 // Stores per-language styles. A FormatStyle instance inside has an empty
5390 // StyleSet. A FormatStyle instance returned by the Get method has its
5397 typedef std::map<FormatStyle::LanguageKind, FormatStyle> MapType;
5399 std::optional<FormatStyle> Get(FormatStyle::LanguageKind Language) const;
5406 void Add(FormatStyle Style);
5416 const FormatStyle &MainStyle,
5417 const std::vector<FormatStyle> &ConfigurationStyles);
5423 parseConfiguration(llvm::MemoryBufferRef Config, FormatStyle *Style,
5431 FormatStyle getLLVMStyle(
5432 FormatStyle::LanguageKind Language = FormatStyle::LanguageKind::LK_Cpp);
5438 FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language);
5442 FormatStyle getChromiumStyle(FormatStyle::LanguageKind Language);
5446 FormatStyle getMozillaStyle();
5450 FormatStyle getWebKitStyle();
5454 FormatStyle getGNUStyle();
5458 FormatStyle getMicrosoftStyle(FormatStyle::LanguageKind Language);
5460 FormatStyle getClangFormatStyle();
5463 FormatStyle getNoStyle();
5471 bool getPredefinedStyle(StringRef Name, FormatStyle::LanguageKind Language,
5472 FormatStyle *Style);
5489 parseConfiguration(llvm::MemoryBufferRef Config, FormatStyle *Style,
5495 inline std::error_code parseConfiguration(StringRef Config, FormatStyle *Style,
5502 std::string configurationAsText(const FormatStyle &Style);
5506 tooling::Replacements sortIncludes(const FormatStyle &Style, StringRef Code,
5516 const FormatStyle &Style);
5533 const FormatStyle &Style);
5558 tooling::Replacements reformat(const FormatStyle &Style, StringRef Code,
5566 tooling::Replacements reformat(const FormatStyle &Style, StringRef Code,
5574 tooling::Replacements cleanup(const FormatStyle &Style, StringRef Code,
5582 tooling::Replacements fixNamespaceEndComments(const FormatStyle &Style,
5593 tooling::Replacements separateDefinitionBlocks(const FormatStyle &Style,
5603 tooling::Replacements sortUsingDeclarations(const FormatStyle &Style,
5611 LangOptions getFormattingLangOpts(const FormatStyle &Style = getLLVMStyle());
5627 /// Construct a FormatStyle based on ``StyleName``.
5652 /// \returns FormatStyle as specified by ``StyleName``. If ``StyleName`` is
5655 Expected<FormatStyle>
5662 // Defaults to FormatStyle::LK_Cpp.
5663 FormatStyle::LanguageKind guessLanguage(StringRef FileName, StringRef Code);
5666 inline StringRef getLanguageName(FormatStyle::LanguageKind Language) {
5668 case FormatStyle::LK_Cpp:
5670 case FormatStyle::LK_CSharp:
5672 case FormatStyle::LK_ObjC:
5674 case FormatStyle::LK_Java:
5676 case FormatStyle::LK_JavaScript:
5678 case FormatStyle::LK_Json:
5680 case FormatStyle::LK_Proto:
5682 case FormatStyle::LK_TableGen:
5684 case FormatStyle::LK_TextProto:
5686 case FormatStyle::LK_Verilog: