| /llvm-project-15.0.7/clang/lib/Format/ |
| H A D | Format.cpp | 983 static FormatStyle &element(IO &IO, std::vector<FormatStyle> &Seq, in element() 1175 FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { in getLLVMStyle() 1176 FormatStyle LLVMStyle; in getLLVMStyle() 1358 FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) { in getGoogleStyle() 1360 FormatStyle GoogleStyle = getGoogleStyle(FormatStyle::LK_Proto); in getGoogleStyle() 1498 FormatStyle getChromiumStyle(FormatStyle::LanguageKind Language) { in getChromiumStyle() 1622 FormatStyle getMicrosoftStyle(FormatStyle::LanguageKind Language) { in getMicrosoftStyle() 1652 FormatStyle getNoStyle() { in getNoStyle() 1802 FormatStyle::FormatStyleSet::Get(FormatStyle::LanguageKind Language) const { in Get() 1813 void FormatStyle::FormatStyleSet::Add(FormatStyle Style) { in Add() [all …]
|
| H A D | TokenAnnotator.cpp | 2401 const FormatStyle &Style; 2634 const FormatStyle &Style; 2838 case FormatStyle::RTBS_None: in mustBreakForReturnType() 2840 case FormatStyle::RTBS_All: in mustBreakForReturnType() 4249 case FormatStyle::SLS_All: in mustBreakBefore() 4972 case FormatStyle::RAS_Pointer: in getTokenReferenceAlignment() 4974 case FormatStyle::RAS_Left: in getTokenReferenceAlignment() 4976 case FormatStyle::RAS_Right: in getTokenReferenceAlignment() 4978 case FormatStyle::RAS_Middle: in getTokenReferenceAlignment() 4992 case FormatStyle::RAS_Left: in getTokenPointerOrReferenceAlignment() [all …]
|
| H A D | ContinuationIndenter.cpp | 187 const FormatStyle &CodeStyle) { in RawStringFormatStyleManager() 192 FormatStyle PredefinedStyle; in RawStringFormatStyleManager() 208 llvm::Optional<FormatStyle> 216 llvm::Optional<FormatStyle> 514 case FormatStyle::BBCDS_Allowed: in mustBreak() 516 case FormatStyle::BBCDS_Always: in mustBreak() 518 case FormatStyle::BBCDS_Never: in mustBreak() 524 case FormatStyle::RCPS_SingleLine: in mustBreak() 1187 case FormatStyle::RCPS_OwnLine: in getNewLineColumn() 1188 case FormatStyle::RCPS_WithFollowing: in getNewLineColumn() [all …]
|
| H A D | ContinuationIndenter.h | 39 llvm::StringMap<FormatStyle> DelimiterStyle; 40 llvm::StringMap<FormatStyle> EnclosingFunctionStyle; 42 RawStringFormatStyleManager(const FormatStyle &CodeStyle); 44 llvm::Optional<FormatStyle> getDelimiterStyle(StringRef Delimiter) const; 46 llvm::Optional<FormatStyle> 54 ContinuationIndenter(const FormatStyle &Style, 113 const FormatStyle &RawStringStyle, 123 llvm::Optional<FormatStyle> getRawStringStyle(const FormatToken &Current, 191 FormatStyle Style;
|
| H A D | UnwrappedLineFormatter.cpp | 156 const FormatStyle &Style; 309 FormatStyle::SFS_InlineOnly) { in tryFitMultipleLinesInOne() 621 FormatStyle::SIS_WithoutElse) { in tryMergeSimpleControlStatement() 889 const FormatStyle &Style; 1026 const FormatStyle &Style; 1436 case FormatStyle::ELBAMS_Never: in formatFirstToken() 1440 case FormatStyle::ELBAMS_Leave: in formatFirstToken() 1449 case FormatStyle::ELBAMS_Always: { in formatFirstToken() 1468 case FormatStyle::ELAAMS_Never: in formatFirstToken() 1471 case FormatStyle::ELAAMS_Leave: in formatFirstToken() [all …]
|
| /llvm-project-15.0.7/clang/unittests/Format/ |
| H A D | FormatTestCSharp.cpp | 40 FormatStyle Style = getMicrosoftStyle(FormatStyle::LK_CSharp); in getStyleWithColumns() 76 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); in TEST_F() 174 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); in TEST_F() 180 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); in TEST_F() 345 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); in TEST_F() 353 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); in TEST_F() 422 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); in TEST_F() 435 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); in TEST_F() 528 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); in TEST_F() 563 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); in TEST_F() [all …]
|
| H A D | FormatTest.cpp | 28 FormatStyle getGoogleStyle() { return getGoogleStyle(FormatStyle::LK_Cpp); } in getGoogleStyle() 55 FormatStyle getStyleWithColumns(FormatStyle Style, unsigned ColumnLimit) { in getStyleWithColumns() 4661 for (auto BraceStyle : {FormatStyle::BS_Attach, FormatStyle::BS_Mozilla, in TEST_F() 4918 FormatStyle style = getChromiumStyle(FormatStyle::LK_Cpp); in TEST_F() 6921 i & 2 ? FormatStyle::PCIS_BinPack : FormatStyle::PCIS_Never; in TEST_F() 9564 FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); in TEST_F() 10765 FormatStyle Style = getChromiumStyle(FormatStyle::LK_Cpp); in TEST_F() 12256 FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); in TEST_F() 20042 FormatStyle Style = {}; in TEST_F() 24049 FormatStyle Style = getChromiumStyle(FormatStyle::LanguageKind::LK_Cpp); in TEST_F() [all …]
|
| H A D | DefinitionBlockSeparatorTest.cpp | 58 FormatStyle InverseStyle = Style; in _verifyFormat() 92 FormatStyle Style = getLLVMStyle(); in TEST_F() 166 FormatStyle Style = getLLVMStyle(); in TEST_F() 180 FormatStyle Style = getLLVMStyle(); in TEST_F() 284 FormatStyle Style = getLLVMStyle(); in TEST_F() 341 FormatStyle Style = getLLVMStyle(); in TEST_F() 392 FormatStyle Style = getLLVMStyle(); in TEST_F() 456 FormatStyle Style = getLLVMStyle(); in TEST_F() 482 FormatStyle Style = getLLVMStyle(); in TEST_F() 533 FormatStyle Style = getLLVMStyle(FormatStyle::LK_CSharp); in TEST_F() [all …]
|
| H A D | QualifierFixerTest.cpp | 66 FormatStyle getStyleWithColumns(FormatStyle Style, unsigned ColumnLimit) { in getStyleWithColumns() 85 FormatStyle ObjCStyle = Style; in _verifyFormat() 139 FormatStyle Style = {}; in TEST_F() 148 FormatStyle Style = {}; in TEST_F() 157 FormatStyle Style = {}; in TEST_F() 169 FormatStyle Style = {}; in TEST_F() 176 FormatStyle Style = {}; in TEST_F() 183 FormatStyle Style = {}; in TEST_F() 190 FormatStyle Style = {}; in TEST_F() 197 FormatStyle Style = getLLVMStyle(); in TEST_F() [all …]
|
| H A D | FormatTestObjC.cpp | 30 Style.Language = FormatStyle::LK_ObjC; in FormatTestObjC() 65 FormatStyle Style; 77 EXPECT_EQ(FormatStyle::LK_ObjC, Style->Language); in TEST() 101 EXPECT_EQ(FormatStyle::LK_Cpp, Style->Language); in TEST() 110 EXPECT_EQ(FormatStyle::LK_Cpp, Style->Language); in TEST() 119 EXPECT_EQ(FormatStyle::LK_Cpp, Style->Language); in TEST() 403 Style = getGoogleStyle(FormatStyle::LK_ObjC); in TEST_F() 501 Style = getGoogleStyle(FormatStyle::LK_ObjC); in TEST_F() 557 Style = getGoogleStyle(FormatStyle::LK_ObjC); in TEST_F() 604 Style = getGoogleStyle(FormatStyle::LK_ObjC); in TEST_F() [all …]
|
| H A D | FormatTestJava.cpp | 35 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_Java)) { in format() 40 FormatStyle Style = getGoogleStyle(FormatStyle::LK_Java); in getStyleWithColumns() 47 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_Java)) { in verifyFormat() 62 FormatStyle Style = getStyleWithColumns(50); in TEST_F() 66 Style.BreakBeforeBinaryOperators = FormatStyle::BOS_None; in TEST_F() 86 getChromiumStyle(FormatStyle::LK_Java)); in TEST_F() 258 FormatStyle Style = getStyleWithColumns(65); in TEST_F() 304 getChromiumStyle(FormatStyle::LK_Java)); in TEST_F() 437 FormatStyle Style = getLLVMStyle(FormatStyle::LK_Java); in TEST_F() 438 Style.BreakBeforeBraces = FormatStyle::BS_Custom; in TEST_F() [all …]
|
| H A D | FormatTestJS.cpp | 38 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_JavaScript)) { in format() 43 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); in getGoogleJSStyleWithColumns() 50 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_JavaScript)) { in verifyFormat() 963 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); in TEST_F() 1002 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); in TEST_F() 1115 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); in TEST_F() 1172 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); in TEST_F() 1279 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); in TEST_F() 2713 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); in TEST_F() 2749 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); in TEST_F() [all …]
|
| H A D | FormatTestTextProto.cpp | 22 unsigned Length, const FormatStyle &Style) { in format() 33 static std::string format(llvm::StringRef Code, const FormatStyle &Style) { in format() 38 const FormatStyle &Style) { in _verifyFormat() 45 FormatStyle Style = getGoogleStyle(FormatStyle::LK_TextProto); in _verifyFormat() 155 FormatStyle Style = getGoogleStyle(FormatStyle::LK_TextProto); in TEST_F() 388 FormatStyle Style = getGoogleStyle(FormatStyle::LK_TextProto); in TEST_F() 548 FormatStyle Style = getGoogleStyle(FormatStyle::LK_TextProto); in TEST_F() 573 FormatStyle Style = getGoogleStyle(FormatStyle::LK_TextProto); in TEST_F() 589 FormatStyle Style = getGoogleStyle(FormatStyle::LK_TextProto); in TEST_F() 600 FormatStyle Style = getGoogleStyle(FormatStyle::LK_TextProto); in TEST_F()
|
| H A D | FormatTestJson.cpp | 22 unsigned Length, const FormatStyle &Style) { in format() 51 const FormatStyle &Style = getLLVMStyle(FormatStyle::LK_Json)) { in format() 55 static FormatStyle getStyleWithColumns(unsigned ColumnLimit) { in getStyleWithColumns() 56 FormatStyle Style = getLLVMStyle(FormatStyle::LK_Json); in getStyleWithColumns() 62 const FormatStyle &Style) { in verifyFormatStable() 68 const FormatStyle &Style = getLLVMStyle(FormatStyle::LK_Json)) { in verifyFormat() 163 FormatStyle Style = getLLVMStyle(FormatStyle::LK_Json); in TEST_F() 200 FormatStyle Style = getLLVMStyle(FormatStyle::LK_Json); in TEST_F()
|
| H A D | FormatTestRawStrings.cpp | 32 const FormatStyle &Style = getLLVMStyle(), in format() 52 FormatStyle getStyleWithColumns(FormatStyle Style, unsigned ColumnLimit) { in getStyleWithColumns() 57 FormatStyle getLLVMStyleWithColumns(unsigned ColumnLimit) { in getLLVMStyleWithColumns() 64 FormatStyle Style = getLLVMStyle(); in getRawStringPbStyleWithColumns() 68 /*Language=*/FormatStyle::LK_TextProto, in getRawStringPbStyleWithColumns() 79 FormatStyle Style = getLLVMStyle(); in getRawStringLLVMCppStyleBasedOn() 82 /*Language=*/FormatStyle::LK_Cpp, in getRawStringLLVMCppStyleBasedOn() 93 FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); in getRawStringGoogleCppStyleBasedOn() 96 /*Language=*/FormatStyle::LK_Cpp, in getRawStringGoogleCppStyleBasedOn() 139 FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); in TEST_F() [all …]
|
| H A D | NamespaceEndCommentsFixerTest.cpp | 25 const FormatStyle &Style = getLLVMStyle()) { in fixNamespaceEndComments() 38 const FormatStyle &Style = getLLVMStyle()) { in fixNamespaceEndComments() 390 FormatStyle CompactNamespacesStyle = getLLVMStyle(); in TEST_F() 463 FormatStyle ObjCppStyle = getLLVMStyle(); in TEST_F() 464 ObjCppStyle.Language = FormatStyle::LK_ObjC; in TEST_F() 477 FormatStyle Style = getLLVMStyle(); in TEST_F() 688 FormatStyle Style = getLLVMStyle(); in TEST_F() 780 FormatStyle CompactNamespacesStyle = getLLVMStyle(); in TEST_F() 807 FormatStyle Style = getLLVMStyle(); in TEST_F() 873 FormatStyle CompactNamespacesStyle = getLLVMStyle(); in TEST_F() [all …]
|
| H A D | FormatTestVerilog.cpp | 22 unsigned Length, const FormatStyle &Style) { in format() 35 const FormatStyle &Style = getLLVMStyle(FormatStyle::LK_Verilog)) { in format() 41 const FormatStyle &Style = getLLVMStyle(FormatStyle::LK_Verilog)) { in verifyFormat() 143 auto Style = getLLVMStyle(FormatStyle::LK_Verilog); in TEST_F()
|
| H A D | FormatTestSelective.cpp | 36 FormatStyle Style = getLLVMStyle(); 101 Style.AllowShortIfStatementsOnASingleLine = FormatStyle::SIS_WithoutElse; in TEST_F() 394 Style.AlignEscapedNewlines = FormatStyle::ENAS_Left; in TEST_F() 535 Style.UseTab = FormatStyle::UT_Always; in TEST_F() 536 Style.AlignEscapedNewlines = FormatStyle::ENAS_Left; in TEST_F() 588 Style = getGoogleStyle(FormatStyle::LK_JavaScript); in TEST_F() 615 Style.NamespaceIndentation = FormatStyle::NI_All; in TEST_F()
|
| H A D | FormatTestComments.cpp | 26 FormatStyle getGoogleStyle() { return getGoogleStyle(FormatStyle::LK_Cpp); } in getGoogleStyle() 54 FormatStyle Style = getLLVMStyle(); in getLLVMStyleWithColumns() 60 FormatStyle Style = getGoogleStyle(FormatStyle::FormatStyle::LK_TextProto); in getTextProtoStyleWithColumns() 463 FormatStyle NoBinPacking = getLLVMStyle(); in TEST_F() 552 FormatStyle Style = getLLVMStyleWithColumns(20); in TEST_F() 781 FormatStyle Pragmas = getLLVMStyleWithColumns(30); in TEST_F() 2451 FormatStyle NoBinPacking = getLLVMStyle(); in TEST_F() 3193 FormatStyle Style = getGoogleStyle(FormatStyle::LK_Java); in TEST_F() 3195 FormatStyle Style20 = getGoogleStyle(FormatStyle::LK_Java); in TEST_F() 3272 FormatStyle JSStyle20 = getGoogleStyle(FormatStyle::LK_JavaScript); in TEST_F() [all …]
|
| H A D | SortImportsTestJava.cpp | 29 FormatStyle FmtStyle; 33 FmtStyle = getGoogleStyle(FormatStyle::LK_Java); in SortImportsTestJava() 35 FmtStyle.SortIncludes = FormatStyle::SI_CaseInsensitive; in SortImportsTestJava() 254 FmtStyle.SortJavaStaticImport = FormatStyle::SJSIO_Before; in TEST_F() 273 FmtStyle.SortJavaStaticImport = FormatStyle::SJSIO_After; in TEST_F() 296 FmtStyle.SortJavaStaticImport = FormatStyle::SJSIO_After; in TEST_F()
|
| H A D | FormatTestProto.cpp | 22 unsigned Length, const FormatStyle &Style) { in format() 34 FormatStyle Style = getGoogleStyle(FormatStyle::LK_Proto); in format() 512 FormatStyle Style = getGoogleStyle(FormatStyle::LK_TextProto); in TEST_F()
|
| /llvm-project-15.0.7/clang/include/clang/Format/ |
| H A D | Format.h | 54 struct FormatStyle { struct 4005 typedef std::map<FormatStyle::LanguageKind, FormatStyle> MapType; 4007 llvm::Optional<FormatStyle> Get(FormatStyle::LanguageKind Language) const; 4039 FormatStyle getLLVMStyle( 4040 FormatStyle::LanguageKind Language = FormatStyle::LanguageKind::LK_Cpp); 4046 FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language); 4050 FormatStyle getChromiumStyle(FormatStyle::LanguageKind Language); 4062 FormatStyle getGNUStyle(); 4066 FormatStyle getMicrosoftStyle(FormatStyle::LanguageKind Language); 4069 FormatStyle getNoStyle(); [all …]
|
| /llvm-project-15.0.7/clang/tools/clang-format/ |
| H A D | ClangFormat.cpp | 440 llvm::Expected<FormatStyle> FormatStyle = in format() local 443 if (!FormatStyle) { in format() 450 FormatStyle->QualifierAlignment = in format() 457 if (FormatStyle->QualifierAlignment == FormatStyle::QAS_Left) { in format() 459 } else if (FormatStyle->QualifierAlignment == FormatStyle::QAS_Right) { in format() 462 FormatStyle->QualifierAlignment = FormatStyle::QAS_Custom; in format() 471 FormatStyle->SortIncludes = FormatStyle::SI_CaseSensitive; in format() 473 FormatStyle->SortIncludes = FormatStyle::SI_Never; in format() 481 if (FormatStyle->isJson() && !FormatStyle->DisableFormat) { in format() 565 llvm::Expected<clang::format::FormatStyle> FormatStyle = in dumpConfig() local [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/unittests/ |
| H A D | FormatTests.cpp | 23 clang::format::FormatStyle Style) { in afterTyped() 40 format::FormatStyle Style = format::getGoogleStyle( in expectAfterNewline() 41 format::FormatStyle::LK_Cpp)) { in expectAfterNewline() 45 format::FormatStyle Style = in expectAfter() 46 format::getGoogleStyle(format::FormatStyle::LK_Cpp)) { in expectAfter() 146 format::FormatStyle TabStyle = in TEST() 147 format::getGoogleStyle(format::FormatStyle::LK_Cpp); in TEST() 148 TabStyle.UseTab = format::FormatStyle::UT_Always; in TEST()
|
| /llvm-project-15.0.7/clang/docs/ |
| H A D | LibFormat.rst | 25 tooling::Replacements reformat(const FormatStyle &Style, Lexer &Lex, 30 ranges in ``Ranges``. The ``FormatStyle`` controls basic decisions made during 49 FormatStyle getLLVMStyle(); 53 FormatStyle getGoogleStyle(); 57 FormatStyle getChromiumStyle(); 61 FormatStyle getGNUStyle(); 65 FormatStyle getMozillaStyle(); 69 FormatStyle getWebkitStyle(); 73 FormatStyle getMicrosoftStyle();
|