Home
last modified time | relevance | path

Searched refs:Style (Results 1 – 25 of 344) sorted by relevance

12345678910>>...14

/llvm-project/clang/unittests/Format/
H A DQualifierFixerTest.cpp21 EXPECT_NE(VALUE, Style.FIELD) << "Initial value already the same!"; \
22 EXPECT_EQ(0, parseConfiguration(TEXT, &Style).value()); \
23 EXPECT_EQ(VALUE, Style.FIELD) << "Unexpected value after parsing!"
26 EXPECT_NE(0, parseConfiguration(TEXT, &Style).value()); \
27 EXPECT_EQ(VALUE, Style.FIELD) << "Unexpected value after parsing!"
32 const FormatStyle &Style = getLLVMStyle()) { in annotate() argument
33 return TestLexer(Allocator, Buffers, Style).annotate(Code); in annotate()
56 FormatStyle Style = {}; in TEST_F() local
57 Style.Language = FormatStyle::LK_Cpp; in TEST_F()
65 FormatStyle Style in TEST_F() local
74 FormatStyle Style = {}; TEST_F() local
86 FormatStyle Style = {}; TEST_F() local
93 FormatStyle Style = {}; TEST_F() local
100 FormatStyle Style = {}; TEST_F() local
107 FormatStyle Style = {}; TEST_F() local
114 FormatStyle Style = getLLVMStyle(); TEST_F() local
148 FormatStyle Style = getLLVMStyle(); TEST_F() local
181 FormatStyle Style = getLLVMStyle(); TEST_F() local
538 FormatStyle Style = getLLVMStyle(); TEST_F() local
846 FormatStyle Style = getLLVMStyle(); TEST_F() local
927 FormatStyle Style = getLLVMStyle(); TEST_F() local
945 FormatStyle Style = getLLVMStyle(); TEST_F() local
958 FormatStyle Style = getLLVMStyle(); TEST_F() local
972 FormatStyle Style = getLLVMStyle(); TEST_F() local
994 FormatStyle Style = getLLVMStyle(); TEST_F() local
1029 FormatStyle Style = getLLVMStyle(); TEST_F() local
1134 FormatStyle Style = getLLVMStyle(); TEST_F() local
1143 FormatStyle Style = getLLVMStyle(); TEST_F() local
1180 auto Style = getLLVMStyle(); TEST_F() local
1194 FormatStyle Style = getLLVMStyle(); TEST_F() local
1210 FormatStyle Style = getLLVMStyle(); TEST_F() local
1225 FormatStyle Style = getLLVMStyle(); TEST_F() local
1265 FormatStyle Style = getLLVMStyle(); TEST_F() local
1280 FormatStyle Style = getLLVMStyle(); TEST_F() local
1302 FormatStyle Style = getLLVMStyle(); TEST_F() local
1325 FormatStyle Style = getLLVMStyle(); TEST_F() local
1355 FormatStyle Style = getLLVMStyle(); TEST_F() local
[all...]
H A DObjCPropertyAttributeOrderFixerTest.cpp21 EXPECT_NE(VALUE, Style.FIELD) << "Initial value already the same!"; \
22 EXPECT_EQ(0, parseConfiguration(TEXT, &Style).value()); \
23 EXPECT_EQ(VALUE, Style.FIELD) << "Unexpected value after parsing!"
26 EXPECT_NE(0, parseConfiguration(TEXT, &Style).value()); \
27 EXPECT_EQ(VALUE, Style.FIELD) << "Unexpected value after parsing!"
32 const FormatStyle &Style = getLLVMStyle()) { in annotate() argument
33 return TestLexer(Allocator, Buffers, Style).annotate(Code); in annotate()
41 FormatStyle Style = {}; in TEST_F() local
42 Style.Language = FormatStyle::LK_ObjC; in TEST_F()
77 FormatStyle Style = getLLVMStyle(); in TEST_F() local
[all …]
H A DFormatTestCSharp.cpp25 const FormatStyle &Style) { in format() argument
29 tooling::Replacements Replaces = reformat(Style, Code, Ranges); in format()
38 const FormatStyle &Style = getMicrosoftStyle(FormatStyle::LK_CSharp)) { in format() argument
39 return format(Code, 0, Code.size(), Style); in format()
43 FormatStyle Style = getMicrosoftStyle(FormatStyle::LK_CSharp); in getStyleWithColumns() local
44 Style.ColumnLimit = ColumnLimit; in getStyleWithColumns()
45 return Style; in getStyleWithColumns()
72 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); in TEST_F() local
73 Style.BreakBeforeBraces = FormatStyle::BS_Attach; in TEST_F()
75 verifyFormat("public class SomeEmptyClass {}", Style); in TEST_F()
129 auto Style = getDefaultStyle(); TEST_F() local
141 auto Style = getDefaultStyle(); TEST_F() local
226 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
232 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
397 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
405 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
474 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
487 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
507 FormatStyle Style = getMicrosoftStyle(FormatStyle::LK_CSharp); TEST_F() local
580 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
615 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
624 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
635 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
648 FormatStyle Style = getMicrosoftStyle(FormatStyle::LK_CSharp); TEST_F() local
675 FormatStyle Style = getLLVMStyle(FormatStyle::LK_CSharp); TEST_F() local
958 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
1001 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
1012 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
1028 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
1155 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
1175 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
1243 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
1283 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
1298 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
1355 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
1434 FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); TEST_F() local
1568 FormatStyle Style = getMicrosoftStyle(FormatStyle::LK_CSharp); TEST_F() local
1623 FormatStyle Style = getMicrosoftStyle(FormatStyle::LK_CSharp); TEST_F() local
1633 auto Style = getLLVMStyle(); TEST_F() local
1650 FormatStyle Style = getLLVMStyle(FormatStyle::LK_CSharp); TEST_F() local
[all...]
H A DBracesRemoverTest.cpp21 FormatStyle Style = getLLVMStyle(); in TEST_F() local
22 Style.RemoveBracesLLVM = true; in TEST_F()
39 Style); in TEST_F()
52 Style); in TEST_F()
65 Style); in TEST_F()
77 Style); in TEST_F()
90 Style); in TEST_F()
98 Style); in TEST_F()
109 Style); in TEST_F()
125 Style); in TEST_F()
[all …]
H A DUsingDeclarationsSorterTest.cpp24 const FormatStyle &Style = getLLVMStyle()) { in sortUsingDeclarations() argument
28 format::sortUsingDeclarations(Style, Code, Ranges, "<stdin>"); in sortUsingDeclarations()
36 const FormatStyle &Style = getLLVMStyle()) { in sortUsingDeclarations() argument
39 Style); in sortUsingDeclarations()
44 FormatStyle Style = getLLVMStyle(); in TEST_F() local
45 EXPECT_EQ(FormatStyle::SUD_LexicographicNumeric, Style.SortUsingDeclarations); in TEST_F()
50 Style)); in TEST_F()
55 Style)); in TEST_F()
60 Style)); in TEST_F()
66 Style)); in TEST_F()
[all …]
H A DFormatTest.cpp49 auto Style = getLLVMStyle(); in TEST_F() local
50 Style.KeepEmptyLines.AtStartOfFile = false; in TEST_F()
51 verifyFormat("int i;", " \n\t \v \f int i;", Style); in TEST_F()
390 FormatStyle Style = getLLVMStyle(); in TEST_F() local
391 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_All; in TEST_F()
392 Style.MaxEmptyLinesToKeep = 2; in TEST_F()
393 Style.BreakBeforeBraces = FormatStyle::BS_Custom; in TEST_F()
394 Style.BraceWrapping.AfterClass = true; in TEST_F()
395 Style.BraceWrapping.AfterFunction = true; in TEST_F()
396 Style in TEST_F()
1761 FormatStyle Style = getLLVMStyle(); TEST_F() local
1852 FormatStyle Style = getLLVMStyle(); TEST_F() local
1888 FormatStyle Style = getLLVMStyleWithColumns(60); TEST_F() local
2028 FormatStyle Style = getLLVMStyle(); TEST_F() local
2374 FormatStyle Style = getLLVMStyle(); TEST_F() local
2713 FormatStyle Style = getLLVMStyle(); TEST_F() local
2824 FormatStyle Style = getLLVMStyle(); TEST_F() local
2869 FormatStyle Style = getLLVMStyle(); TEST_F() local
2903 FormatStyle Style = getLLVMStyle(); TEST_F() local
3132 FormatStyle Style = getLLVMStyle(); TEST_F() local
3201 FormatStyle Style = getLLVMStyleWithColumns(20); TEST_F() local
3425 FormatStyle Style = getLLVMStyle(); TEST_F() local
3953 FormatStyle Style = getLLVMStyleWithColumns(40); TEST_F() local
4034 FormatStyle Style = getLLVMStyle(); TEST_F() local
4184 FormatStyle Style = getLLVMStyle(); TEST_F() local
4347 FormatStyle Style = getLLVMStyle(); TEST_F() local
4442 FormatStyle Style = getLLVMStyle(); TEST_F() local
4639 FormatStyle Style = getLLVMStyle(); TEST_F() local
4664 FormatStyle Style = getLLVMStyle(); TEST_F() local
4776 auto Style = getLLVMStyleWithColumns(0); TEST_F() local
4854 FormatStyle Style = getLLVMStyle(); TEST_F() local
4928 FormatStyle Style = getLLVMStyle(); TEST_F() local
5072 auto Style = getLLVMStyleWithColumns(60); TEST_F() local
5733 FormatStyle Style = getLLVMStyle(); TEST_F() local
5993 FormatStyle Style = getLLVMStyle(); TEST_F() local
6083 FormatStyle Style = getLLVMStyleWithColumns(40); TEST_F() local
6457 FormatStyle Style = getLLVMStyle(); TEST_F() local
6948 FormatStyle Style = getGoogleStyle(); TEST_F() local
6987 FormatStyle Style = getLLVMStyle(); TEST_F() local
7021 FormatStyle Style = getLLVMStyle(); TEST_F() local
7237 FormatStyle Style = getLLVMStyle(); TEST_F() local
7345 FormatStyle Style = getLLVMStyle(); TEST_F() local
7456 FormatStyle Style = getLLVMStyle(); TEST_F() local
7492 FormatStyle Style = getLLVMStyle(); TEST_F() local
7501 FormatStyle Style = getLLVMStyleWithColumns(40); TEST_F() local
7554 auto Style = getLLVMStyleWithColumns(45); TEST_F() local
7719 FormatStyle Style = getLLVMStyleWithColumns(60); TEST_F() local
7919 FormatStyle Style = getLLVMStyleWithColumns(60); TEST_F() local
7973 FormatStyle Style = getLLVMStyleWithColumns(35); TEST_F() local
8038 FormatStyle Style = getLLVMStyle(); TEST_F() local
8067 FormatStyle Style = getLLVMStyle(); TEST_F() local
8120 FormatStyle Style = getLLVMStyle(); TEST_F() local
8524 FormatStyle Style = getLLVMStyle(); TEST_F() local
8565 FormatStyle Style = getLLVMStyleWithColumns(60); TEST_F() local
8605 FormatStyle Style = getGoogleStyleWithColumns(47); TEST_F() local
8928 FormatStyle Style = getLLVMStyleWithColumns(15); TEST_F() local
9156 FormatStyle Style = getLLVMStyle(); TEST_F() local
9219 FormatStyle Style = getLLVMStyle(); TEST_F() local
9343 FormatStyle Style = getLLVMStyleWithColumns(40); TEST_F() local
9502 FormatStyle Style = getLLVMStyleWithColumns(70); TEST_F() local
9654 FormatStyle Style = getLLVMStyleWithColumns(70); TEST_F() local
9892 FormatStyle Style = getGoogleStyle(); TEST_F() local
9989 FormatStyle Style = getLLVMStyle(); TEST_F() local
10832 auto Style = getLLVMStyle(); TEST_F() local
10902 FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); TEST_F() local
10947 FormatStyle Style = getLLVMStyle(); TEST_F() local
11061 FormatStyle Style = getLLVMStyle(); TEST_F() local
11162 FormatStyle Style = getLLVMStyle(); TEST_F() local
11543 FormatStyle Style = getLLVMStyle(); TEST_F() local
11896 FormatStyle Style = getLLVMStyle(); TEST_F() local
12229 FormatStyle Style = getChromiumStyle(FormatStyle::LK_Cpp); TEST_F() local
12253 FormatStyle Style = getLLVMStyle(); TEST_F() local
12276 FormatStyle Style = getLLVMStyle(); TEST_F() local
12289 FormatStyle Style = getLLVMStyle(); TEST_F() local
12670 FormatStyle Style = getLLVMStyle(); TEST_F() local
12974 FormatStyle Style = getLLVMStyle(); TEST_F() local
13342 FormatStyle Style = getLLVMStyle(); TEST_F() local
13578 FormatStyle Style = getLLVMStyle(); TEST_F() local
13682 FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); TEST_F() local
14564 FormatStyle Style = getLLVMStyleWithColumns(40); TEST_F() local
14631 FormatStyle Style = getLLVMStyleWithColumns(40); TEST_F() local
14661 FormatStyle Style = getLLVMStyle(); TEST_F() local
14672 FormatStyle Style = getLLVMStyle(); TEST_F() local
14778 FormatStyle Style = getLLVMStyle(); TEST_F() local
14805 FormatStyle Style = getLLVMStyle(); TEST_F() local
14828 FormatStyle Style = getLLVMStyle(); TEST_F() local
14856 FormatStyle Style = getLLVMStyle(); TEST_F() local
15163 FormatStyle Style = getLLVMStyle(); TEST_F() local
15348 FormatStyle Style = getLLVMStyleWithColumns(12); TEST_F() local
15418 FormatStyle Style = getGoogleStyleWithColumns(15); TEST_F() local
15427 FormatStyle Style = getLLVMStyleWithColumns(20); TEST_F() local
15545 FormatStyle Style = getLLVMStyleWithColumns(25); TEST_F() local
15628 FormatStyle Style = getLLVMStyle(); TEST_F() local
15635 FormatStyle Style = getLLVMStyle(); TEST_F() local
17774 FormatStyle Style = getLLVMStyle(); TEST_F() local
17869 FormatStyle Style = getLLVMStyle(); TEST_F() local
19801 FormatStyle Style = getMozillaStyle(); TEST_F() local
20100 auto Style = getLLVMStyleWithColumns(120); TEST_F() local
20248 auto Style = getLLVMStyleWithColumns(60); TEST_F() local
21293 auto Style = getLLVMStyle(); TEST_F() local
21555 auto Style = getLLVMStyle(); TEST_F() local
21864 auto Style = getLLVMStyleWithColumns(0); TEST_F() local
21870 FormatStyle Style = getLLVMStyleWithColumns(20); TEST_F() local
21984 FormatStyle Style = getLLVMStyle(); TEST_F() local
21998 FormatStyle Style = getLLVMStyle(); TEST_F() local
22014 FormatStyle Style = getLLVMStyle(); TEST_F() local
22044 FormatStyle Style = getLLVMStyle(); TEST_F() local
22073 auto Style = getLLVMStyle(); TEST_F() local
22191 FormatStyle Style = getLLVMStyle(); TEST_F() local
22232 FormatStyle Style = getLLVMStyle(); TEST_F() local
22328 FormatStyle Style = getLLVMStyle(); TEST_F() local
22405 FormatStyle Style = getWebKitStyle(); TEST_F() local
22887 auto Style = getGoogleStyle(); TEST_F() local
23926 FormatStyle Style = getLLVMStyle(); TEST_F() local
24014 FormatStyle Style = getLLVMStyle(); TEST_F() local
24224 FormatStyle Style = getLLVMStyle(); TEST_F() local
24260 FormatStyle Style = getLLVMStyle(); TEST_F() local
24563 FormatStyle Style = getLLVMStyle(); TEST_F() local
24604 FormatStyle Style = getLLVMStyle(); TEST_F() local
24634 FormatStyle Style = getLLVMStyle(); TEST_F() local
24731 FormatStyle Style = getLLVMStyle(); TEST_F() local
24885 FormatStyle Style = getLLVMStyle(); TEST_F() local
24896 FormatStyle Style = getLLVMStyle(); TEST_F() local
24921 auto Style = getLLVMStyle(); TEST_F() local
25064 FormatStyle Style = getLLVMStyleWithColumns(80); TEST_F() local
25129 FormatStyle Style = getLLVMStyle(); TEST_F() local
25254 FormatStyle Style = getLLVMStyle(); TEST_F() local
25261 FormatStyle Style = getGNUStyle(); TEST_F() local
25269 FormatStyle Style = getMozillaStyle(); TEST_F() local
25277 FormatStyle Style = getGoogleStyle(); TEST_F() local
25284 FormatStyle Style = getChromiumStyle(FormatStyle::LanguageKind::LK_Cpp); TEST_F() local
25291 FormatStyle Style = getMicrosoftStyle(FormatStyle::LanguageKind::LK_Cpp); TEST_F() local
25299 FormatStyle Style = getWebKitStyle(); TEST_F() local
25312 FormatStyle Style = getLLVMStyle(); TEST_F() local
25724 auto Style = getLLVMStyle(); TEST_F() local
26001 auto Style = getLLVMStyle(); TEST_F() local
26056 auto Style = getLLVMStyle(); TEST_F() local
26173 FormatStyle Style = getLLVMStyle(); TEST_F() local
26203 FormatStyle Style = getLLVMStyle(); TEST_F() local
26269 auto Style = getLLVMStyleWithColumns(0); TEST_F() local
26320 FormatStyle Style = getLLVMStyle(); TEST_F() local
26389 FormatStyle Style = getLLVMStyle(); TEST_F() local
26418 FormatStyle Style = getLLVMStyleWithColumns(40); TEST_F() local
26447 auto Style = getLLVMStyle(); TEST_F() local
26464 auto Style = getLLVMStyle(); TEST_F() local
26476 auto Style = getLLVMStyleWithColumns(70); TEST_F() local
26524 auto Style = getLLVMStyle(); TEST_F() local
26682 auto Style = getLLVMStyle(); TEST_F() local
26744 auto Style = getLLVMStyle(); TEST_F() local
26774 auto Style = getLLVMStyleWithColumns(60); TEST_F() local
26933 auto Style = getLLVMStyle(); TEST_F() local
26997 auto Style = getLLVMStyle(); TEST_F() local
27067 FormatStyle Style = getLLVMStyle(); TEST_F() local
27152 FormatStyle Style = getLLVMStyle(); TEST_F() local
27342 FormatStyle Style = getLLVMStyle(); TEST_F() local
27350 FormatStyle Style = getLLVMStyle(); TEST_F() local
27383 FormatStyle Style = getLLVMStyle(); TEST_F() local
27495 auto Style = getLLVMStyleWithColumns(35); TEST_F() local
27581 auto Style = getLLVMStyle(); TEST_F() local
27592 auto Style = getLLVMStyle(); TEST_F() local
[all...]
H A DIntegerLiteralSeparatorTest.cpp21 FormatStyle Style = getLLVMStyle(); in TEST_F() local
22 EXPECT_EQ(Style.Language, FormatStyle::LK_Cpp); in TEST_F()
23 EXPECT_EQ(Style.IntegerLiteralSeparator.Binary, 0); in TEST_F()
24 EXPECT_EQ(Style.IntegerLiteralSeparator.Decimal, 0); in TEST_F()
25 EXPECT_EQ(Style.IntegerLiteralSeparator.Hex, 0); in TEST_F()
28 verifyFormat(Binary, Style); in TEST_F()
29 Style.IntegerLiteralSeparator.Binary = -1; in TEST_F()
30 verifyFormat("b = 0b100111101101u;", Binary, Style); in TEST_F()
31 Style.IntegerLiteralSeparator.Binary = 1; in TEST_F()
32 verifyFormat("b = 0b1'0'0'1'1'1'1'0'1'1'0'1u;", Binary, Style); in TEST_F()
[all …]
H A DFormatTestMacroExpansion.cpp21 FormatStyle Style = getLLVMStyle(); in TEST_F() local
22 Style.Macros.push_back("CLASS=class C {"); in TEST_F()
23 Style.Macros.push_back("SEMI=;"); in TEST_F()
24 Style.Macros.push_back("STMT=f();"); in TEST_F()
25 Style.Macros.push_back("ID(x)=x"); in TEST_F()
26 Style.Macros.push_back("ID3(x, y, z)=x y z"); in TEST_F()
27 Style.Macros.push_back("CALL(x)=f([] { x })"); in TEST_F()
28 Style.Macros.push_back("ASSIGN_OR_RETURN(a, b)=a = (b)"); in TEST_F()
29 Style.Macros.push_back("ASSIGN_OR_RETURN(a, b, c)=a = (b); if (x) return c"); in TEST_F()
30 Style.Macros.push_back("MOCK_METHOD(r, n, a, s)=r n a s"); in TEST_F()
[all …]
H A DFormatTestObjC.cpp21 Style = getLLVMStyle(); in FormatTestObjC()
22 Style.Language = FormatStyle::LK_ObjC; in FormatTestObjC()
25 FormatStyle getDefaultStyle() const override { return Style; } in getDefaultStyle()
27 FormatStyle Style; member in clang::format::test::__anon296931c80111::FormatTestObjC
35 auto Style = getStyle("LLVM", "<stdin>", "none", in TEST() local
38 ASSERT_TRUE((bool)Style); in TEST()
39 EXPECT_EQ(FormatStyle::LK_ObjC, Style->Language); in TEST()
43 auto Style = getStyle("LLVM", "a.h", "none", in TEST() local
46 ASSERT_TRUE((bool)Style); in TEST()
47 EXPECT_EQ(FormatStyle::LK_ObjC, Style in TEST()
169 auto Style = getStyle("LLVM", "a.h", "none", TEST() local
[all...]
H A DFormatTestVerilog.cpp28 FormatStyle Style = getDefaultStyle(); in TEST_F() local
29 Style.AlignConsecutiveAssignments.Enabled = true; in TEST_F()
33 Style); in TEST_F()
37 Style); in TEST_F()
42 Style); in TEST_F()
45 Style); in TEST_F()
48 Style); in TEST_F()
51 Style); in TEST_F()
54 Style); in TEST_F()
57 Style); in TEST_F()
185 auto Style = getDefaultStyle(); TEST_F() local
257 auto Style = getDefaultStyle(); TEST_F() local
605 auto Style = getDefaultStyle(); TEST_F() local
883 auto Style = getDefaultStyle(); TEST_F() local
968 auto Style = getDefaultStyle(); TEST_F() local
992 auto Style = getDefaultStyle(); TEST_F() local
1077 auto Style = getDefaultStyle(); TEST_F() local
1274 auto Style = getStyleWithColumns(getDefaultStyle(), 24); TEST_F() local
1331 auto Style = getDefaultStyle(); TEST_F() local
[all...]
H A DBracesInserterTest.cpp21 FormatStyle Style = getLLVMStyle(); in TEST_F() local
22 Style.InsertBraces = true; in TEST_F()
36 Style); in TEST_F()
55 Style); in TEST_F()
65 Style); in TEST_F()
72 Style); in TEST_F()
80 Style); in TEST_F()
92 Style); in TEST_F()
106 Style); in TEST_F()
117 Style); in TEST_F()
[all …]
H A DFormatTestJson.cpp22 const FormatStyle &Style) { in format() argument
30 if (Style.isJson() && !Style.DisableFormat) { in format()
42 Replaces = reformat(Style, NewCode, Ranges); in format()
51 const FormatStyle &Style = getLLVMStyle(FormatStyle::LK_Json)) { in format() argument
52 return format(Code, 0, Code.size(), Style); in format()
56 FormatStyle Style = getLLVMStyle(FormatStyle::LK_Json); in getStyleWithColumns() local
57 Style.ColumnLimit = ColumnLimit; in getStyleWithColumns()
58 return Style; in getStyleWithColumns()
61 static void verifyFormatStable(StringRef Code, const FormatStyle &Style) { in verifyFormatStable() argument
62 EXPECT_EQ(Code.str(), format(Code, Style)) << "Expected code is not stable"; in verifyFormatStable()
[all …]
H A DNamespaceEndCommentsFixerTest.cpp25 const FormatStyle &Style = getLLVMStyle()) { in fixNamespaceEndComments() argument
29 format::fixNamespaceEndComments(Style, Code, Ranges, "<stdin>"); in fixNamespaceEndComments()
38 const FormatStyle &Style = getLLVMStyle()) { in fixNamespaceEndComments() argument
41 /*Ranges=*/{1, tooling::Range(0, Code.size())}, Style); in fixNamespaceEndComments()
45 const FormatStyle &Style = getLLVMStyle()) const { in isFormatted() argument
46 return format::fixNamespaceEndComments(Style, Code, Ranges, "<stdin>") in isFormatted()
51 const FormatStyle &Style = getLLVMStyle()) const { in isFormatted() argument
52 return isFormatted(Code, {1, tooling::Range(0, Code.size())}, Style); in isFormatted()
488 FormatStyle Style = getLLVMStyle(); in TEST_F() local
489 Style.NamespaceMacros.push_back("TESTSUITE"); in TEST_F()
[all …]
H A DFormatTestJava.cpp25 FormatStyle Style = getGoogleStyle(FormatStyle::LK_Java); in getStyleWithColumns() local
26 Style.ColumnLimit = ColumnLimit; in getStyleWithColumns()
27 return Style; in getStyleWithColumns()
40 FormatStyle Style = getStyleWithColumns(50); in TEST_F() local
43 Style); in TEST_F()
44 Style.BreakBeforeBinaryOperators = FormatStyle::BOS_None; in TEST_F()
47 Style); in TEST_F()
236 FormatStyle Style = getStyleWithColumns(65); in TEST_F() local
237 Style.Cpp11BracedListStyle = false; in TEST_F()
241 Style); in TEST_F()
[all …]
H A DFormatTestTableGen.cpp22 const FormatStyle &Style) { in format() argument
26 tooling::Replacements Replaces = reformat(Style, Code, Ranges); in format()
34 FormatStyle Style = getGoogleStyle(FormatStyle::LK_TableGen); in format() local
35 Style.ColumnLimit = 60; // To make writing tests easier. in format()
36 return format(Code, 0, Code.size(), Style); in format()
48 static void verifyFormat(StringRef Code, const FormatStyle &Style) { in verifyFormat() argument
49 EXPECT_EQ(Code.str(), format(Code, 0, Code.size(), Style)) in verifyFormat()
52 EXPECT_EQ(Code.str(), format(MessUp, 0, MessUp.size(), Style)); in verifyFormat()
348 FormatStyle Style = getGoogleStyle(FormatStyle::LK_TableGen); in TEST_F()
349 Style in TEST_F()
345 FormatStyle Style = getGoogleStyle(FormatStyle::LK_TableGen); TEST_F() local
382 FormatStyle Style = getGoogleStyle(FormatStyle::LK_TableGen); TEST_F() local
424 FormatStyle Style = getGoogleStyle(FormatStyle::LK_TableGen); TEST_F() local
456 FormatStyle Style = getGoogleStyle(FormatStyle::LK_TableGen); TEST_F() local
470 FormatStyle Style = getGoogleStyle(FormatStyle::LK_TableGen); TEST_F() local
[all...]
H A DFormatTestComments.cpp423 auto Style = getLLVMStyle(); in TEST_F()
424 Style.BinPackParameters = FormatStyle::BPPS_OnePerLine; in TEST_F()
429 Style); in TEST_F()
430 verifyFormat("int a(/* 1st */ int b, /* 2nd */ int c);", Style); in TEST_F()
434 Style); in TEST_F()
436 Style.BinPackParameters = FormatStyle::BPPS_AlwaysOnePerLine; in TEST_F()
439 Style); in TEST_F()
522 FormatStyle Style = getLLVMStyleWithColumns(20); in TEST_F()
523 Style.ReflowComments = FormatStyle::RCS_Never; in TEST_F()
524 verifyFormat("// aaaaaaaaa aaaaaaaaaa aaaaaaaaaa", Style);
495 FormatStyle Style = getLLVMStyleWithColumns(20); TEST_F() local
1078 auto Style = getLLVMStyle(); TEST_F() local
2862 FormatStyle Style = getLLVMStyle(); TEST_F() local
3043 FormatStyle Style = getLLVMStyle(); TEST_F() local
3151 FormatStyle Style = getLLVMStyle(); TEST_F() local
3720 FormatStyle Style = getGoogleStyle(FormatStyle::LK_Java); TEST_F() local
3820 FormatStyle Style = getLLVMStyle(); TEST_F() local
[all...]
H A DDefinitionBlockSeparatorTest.cpp26 const FormatStyle &Style = getLLVMStyle()) { in separateDefinitionBlocks() argument
29 tooling::Replacements Replaces = reformat(Style, Code, Ranges, "<stdin>"); in separateDefinitionBlocks()
38 const FormatStyle &Style = getLLVMStyle()) { in separateDefinitionBlocks() argument
41 /*Ranges=*/{1, tooling::Range(0, Code.size())}, Style); in separateDefinitionBlocks()
45 const FormatStyle &Style = getLLVMStyle(), in _verifyFormat() argument
54 EXPECT_EQ(ExpectedCode, separateDefinitionBlocks(ExpectedCode, Style)) in _verifyFormat()
57 FormatStyle InverseStyle = Style; in _verifyFormat()
58 if (Style.SeparateDefinitionBlocks == FormatStyle::SDS_Always) in _verifyFormat()
68 std::string Result = separateDefinitionBlocks(CodeToFormat, Style); in _verifyFormat()
91 FormatStyle Style = getLLVMStyle(); in TEST_F() local
[all …]
H A DFormatTestJS.cpp22 const FormatStyle &Style) { in format() argument
28 reformat(Style, Code, Ranges, "<stdin>", &Status); in format()
38 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_JavaScript)) { in format() argument
39 return format(Code, 0, Code.size(), Style); in format()
43 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); in getGoogleJSStyleWithColumns() local
44 Style.ColumnLimit = ColumnLimit; in getGoogleJSStyleWithColumns()
45 return Style; in getGoogleJSStyleWithColumns()
50 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_JavaScript)) { in verifyFormat() argument
51 EXPECT_EQ(Code.str(), format(Code, Style)) << "Expected code is not stable"; in verifyFormat()
52 std::string Result = format(test::messUp(Code), Style); in verifyFormat()
58 verifyFormat(StringRef Expected,StringRef Code,const FormatStyle & Style=getGoogleStyle (FormatStyle::LK_JavaScript)) verifyFormat() argument
263 FormatStyle Style = getGoogleJSStyleWithColumns(80); TEST_F() local
960 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); TEST_F() local
999 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); TEST_F() local
1112 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); TEST_F() local
1169 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); TEST_F() local
1276 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); TEST_F() local
1760 const FormatStyle &Style = getGoogleJSStyleWithColumns(22); TEST_F() local
1857 const FormatStyle &Style = getGoogleJSStyleWithColumns(20); TEST_F() local
1976 FormatStyle Style = getGoogleJSStyleWithColumns(80); TEST_F() local
2730 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); TEST_F() local
2766 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); TEST_F() local
2803 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); TEST_F() local
[all...]
H A DConfigParseTest.cpp24 << "Style #" << i << " of " << Styles.size() << " differs from Style #0"
120 Style.FIELD = false; \
121 EXPECT_EQ(0, parseConfiguration(CONFIG_NAME ": true", &Style).value()); \
122 EXPECT_TRUE(Style.FIELD); \
123 EXPECT_EQ(0, parseConfiguration(CONFIG_NAME ": false", &Style).value()); \
124 EXPECT_FALSE(Style.FIELD)
129 Style.STRUCT.FIELD = false; \
131 parseConfiguration(#STRUCT ":\n " CONFIG_NAME ": true", &Style) \
133 EXPECT_TRUE(Style
153 FormatStyle Style = {}; TEST() local
253 FormatStyle Style = {}; TEST() local
1041 FormatStyle Style = {}; TEST() local
1164 FormatStyle Style = {}; TEST() local
1185 FormatStyle Style = getLLVMStyle(); TEST() local
1295 auto Style = getNoStyle(); TEST() local
1316 auto Style = getNoStyle(); TEST() local
1326 auto Style = getLLVMStyle(); TEST() local
1339 auto Style = getGoogleStyle(); TEST() local
1347 auto Style = getGoogleStyle(); TEST() local
1389 auto Style = getLLVMStyle(); TEST() local
1397 auto Style = getLLVMStyle(); TEST() local
1421 auto Style = getStyle("file:/e/explicit.clang-format", TEST() local
1473 auto Style = getStyle("{invalid_key=invalid_value}", "a.h", "LLVM", "", &FS, TEST() local
[all...]
H A DSortIncludesTest.cpp52 tooling::IncludeStyle &Style = FmtStyle.IncludeStyle; member in clang::format::__anone50231800111::SortIncludesTest
187 Style.IncludeBlocks = tooling::IncludeStyle::IBS_Merge; in TEST_F()
197 Style.IncludeBlocks = tooling::IncludeStyle::IBS_Regroup; in TEST_F()
226 Style.IncludeBlocks = Style.IBS_Merge; in TEST_F()
365 Style.IncludeBlocks = tooling::IncludeStyle::IBS_Merge; in TEST_F()
385 Style.IncludeBlocks = tooling::IncludeStyle::IBS_Merge; in TEST_F()
395 Style.IncludeBlocks = tooling::IncludeStyle::IBS_Regroup; in TEST_F()
438 Style.IncludeBlocks = tooling::IncludeStyle::IBS_Regroup; in TEST_F()
475 Style in TEST_F()
[all...]
/llvm-project/llvm/include/llvm/Support/
H A DPath.h27 enum class Style { enum
36 constexpr bool is_style_posix(Style S) { in is_style_posix()
37 if (S == Style::posix) in is_style_posix()
39 if (S != Style::native) in is_style_posix()
49 constexpr bool is_style_windows(Style S) { return !is_style_posix(S); } in is_style_windows()
79 Style S = Style::native; ///< The path style to use.
82 friend const_iterator begin(StringRef path, Style style);
105 Style S = Style
[all...]
H A DFormatProviders.h94 static size_t consumeNumHexDigits(StringRef &Str, HexPrintStyle Style, in consumeNumHexDigits() argument
97 if (isPrefixedHexStyle(Style)) in consumeNumHexDigits()
134 static void format(const T &V, llvm::raw_ostream &Stream, StringRef Style) {
136 if (std::optional<HexPrintStyle> HS = consumeHexStyle(Style)) {
137 Digits = consumeNumHexDigits(Style, *HS, 0);
143 if (Style.consume_front("N") || Style.consume_front("n"))
145 else if (Style.consume_front("D") || Style.consume_front("d"))
148 Style.consumeInteger(10, Digits);
149 assert(Style.empty() && "Invalid integral format style!");
182 static void format(const T &V, llvm::raw_ostream &Stream, StringRef Style) {
[all …]
/llvm-project/clang/lib/Format/
H A DFormat.cpp855 static void mapping(IO &IO, FormatStyle &Style) { in mapping()
857 IO.mapOptional("Language", Style.Language); in mapping()
865 if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) && in mapping()
866 Style == PredefinedStyle) { in mapping()
874 FormatStyle::LanguageKind OldLanguage = Style.Language; in mapping()
877 if (!getPredefinedStyle(BasedOnStyle, Language, &Style)) { in mapping()
881 Style.Language = OldLanguage; in mapping()
914 IO.mapOptional("AlignEscapedNewlinesLeft", Style.AlignEscapedNewlines); in mapping()
916 IO.mapOptional("AlwaysBreakAfterReturnType", Style.BreakAfterReturnType); in mapping()
918 Style in mapping()
1861 FormatStyle Style = getLLVMStyle(); getWebKitStyle() local
1885 FormatStyle Style = getLLVMStyle(); getGNUStyle() local
1900 FormatStyle Style = getLLVMStyle(Language); getMicrosoftStyle() local
1929 FormatStyle Style = getLLVMStyle(); getClangFormatStyle() local
1950 getPredefinedStyle(StringRef Name,FormatStyle::LanguageKind Language,FormatStyle * Style) getPredefinedStyle() argument
1978 validateQualifierOrder(FormatStyle * Style) validateQualifierOrder() argument
2011 parseConfiguration(llvm::MemoryBufferRef Config,FormatStyle * Style,bool AllowUnknownOptions,llvm::SourceMgr::DiagHandlerTy DiagHandler,void * DiagHandlerCtxt) parseConfiguration() argument
2052 for (const FormatStyle &Style : llvm::reverse(Styles)) { parseConfiguration() local
2076 configurationAsText(const FormatStyle & Style) configurationAsText() argument
2098 FormatStyle Style = It->second; Get() local
2103 Add(FormatStyle Style) Add() argument
2125 ParensRemover(const Environment & Env,const FormatStyle & Style) ParensRemover() argument
2169 BracesInserter(const Environment & Env,const FormatStyle & Style) BracesInserter() argument
2222 BracesRemover(const Environment & Env,const FormatStyle & Style) BracesRemover() argument
2273 SemiRemover(const Environment & Env,const FormatStyle & Style) SemiRemover() argument
2333 JavaScriptRequoter(const Environment & Env,const FormatStyle & Style) JavaScriptRequoter() argument
2421 Formatter(const Environment & Env,const FormatStyle & Style,FormattingAttemptStatus * Status) Formatter() argument
2563 TrailingCommaInserter(const Environment & Env,const FormatStyle & Style) TrailingCommaInserter() argument
2624 Cleaner(const Environment & Env,const FormatStyle & Style) Cleaner() argument
2847 ObjCHeaderStyleGuesser(const Environment & Env,const FormatStyle & Style) ObjCHeaderStyleGuesser() argument
3075 sortCppIncludes(const FormatStyle & Style,const SmallVectorImpl<IncludeDirective> & Includes,ArrayRef<tooling::Range> Ranges,StringRef FileName,StringRef Code,tooling::Replacements & Replaces,unsigned * Cursor) sortCppIncludes() argument
3176 sortCppIncludes(const FormatStyle & Style,StringRef Code,ArrayRef<tooling::Range> Ranges,StringRef FileName,tooling::Replacements & Replaces,unsigned * Cursor) sortCppIncludes() argument
3291 findJavaImportGroup(const FormatStyle & Style,StringRef ImportIdentifier) findJavaImportGroup() argument
3311 sortJavaImports(const FormatStyle & Style,const SmallVectorImpl<JavaImportDirective> & Imports,ArrayRef<tooling::Range> Ranges,StringRef FileName,StringRef Code,tooling::Replacements & Replaces) sortJavaImports() argument
3393 sortJavaImports(const FormatStyle & Style,StringRef Code,ArrayRef<tooling::Range> Ranges,StringRef FileName,tooling::Replacements & Replaces) sortJavaImports() argument
3454 sortIncludes(const FormatStyle & Style,StringRef Code,ArrayRef<tooling::Range> Ranges,StringRef FileName,unsigned * Cursor) sortIncludes() argument
3478 processReplacements(T ProcessFunc,StringRef Code,const tooling::Replacements & Replaces,const FormatStyle & Style) processReplacements() argument
3496 formatReplacements(StringRef Code,const tooling::Replacements & Replaces,const FormatStyle & Style) formatReplacements() argument
3511 __anon57ed8e8e0b02(const FormatStyle &Style, StringRef Code, std::vector<tooling::Range> Ranges, StringRef FileName) formatReplacements() argument
3534 fixCppIncludeInsertions(StringRef Code,const tooling::Replacements & Replaces,const FormatStyle & Style) fixCppIncludeInsertions() argument
3606 cleanupAroundReplacements(StringRef Code,const tooling::Replacements & Replaces,const FormatStyle & Style) cleanupAroundReplacements() argument
3622 reformat(const FormatStyle & Style,StringRef Code,ArrayRef<tooling::Range> Ranges,unsigned FirstStartColumn,unsigned NextStartColumn,unsigned LastStartColumn,StringRef FileName,FormattingAttemptStatus * Status) reformat() argument
3808 reformat(const FormatStyle & Style,StringRef Code,ArrayRef<tooling::Range> Ranges,StringRef FileName,FormattingAttemptStatus * Status) reformat() argument
3819 cleanup(const FormatStyle & Style,StringRef Code,ArrayRef<tooling::Range> Ranges,StringRef FileName) cleanup() argument
3831 reformat(const FormatStyle & Style,StringRef Code,ArrayRef<tooling::Range> Ranges,StringRef FileName,bool * IncompleteFormat) reformat() argument
3841 fixNamespaceEndComments(const FormatStyle & Style,StringRef Code,ArrayRef<tooling::Range> Ranges,StringRef FileName) fixNamespaceEndComments() argument
3851 sortUsingDeclarations(const FormatStyle & Style,StringRef Code,ArrayRef<tooling::Range> Ranges,StringRef FileName) sortUsingDeclarations() argument
3861 getFormattingLangOpts(const FormatStyle & Style) getFormattingLangOpts() argument
3969 loadAndParseConfigFile(StringRef ConfigFile,llvm::vfs::FileSystem * FS,FormatStyle * Style,bool AllowUnknownOptions,llvm::SourceMgr::DiagHandlerTy DiagHandler) loadAndParseConfigFile() argument
3987 FormatStyle Style = getLLVMStyle(guessLanguage(FileName, Code)); getStyle() local
4057 __anon57ed8e8e1c02(FormatStyle *Style) getStyle() argument
[all...]
/llvm-project/llvm/lib/DebugInfo/PDB/Native/
H A DFormatUtil.cpp130 #define PUSH_CHARACTERISTIC_FLAG(Enum, TheOpt, Value, Style, Descriptive) \
132 ((Style == CharacteristicStyle::HeaderDefinition) ? #TheOpt \
135 #define PUSH_MASKED_CHARACTERISTIC_FLAG(Enum, Mask, TheOpt, Value, Style, \
138 ((Style == CharacteristicStyle::HeaderDefinition) \
146 CharacteristicStyle Style) { in formatSectionCharacteristics()
153 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_TYPE_NOLOAD, C, Style, "noload"); in formatSectionCharacteristics()
154 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_TYPE_NO_PAD, C, Style, "no padding"); in formatSectionCharacteristics()
155 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_CNT_CODE, C, Style, "code"); in formatSectionCharacteristics()
156 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_CNT_INITIALIZED_DATA, C, Style, in formatSectionCharacteristics()
158 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_CNT_UNINITIALIZED_DATA, C, Style, in formatSectionCharacteristics()
131 PUSH_CHARACTERISTIC_FLAG(Enum,TheOpt,Value,Style,Descriptive) global() argument
136 PUSH_MASKED_CHARACTERISTIC_FLAG(Enum,Mask,TheOpt,Value,Style,Descriptive) global() argument
147 formatSectionCharacteristics(uint32_t IndentLevel,uint32_t C,uint32_t FlagsPerLine,StringRef Separator,CharacteristicStyle Style) formatSectionCharacteristics() argument
[all...]
/llvm-project/llvm/lib/Support/
H A DNativeFormatting.cpp56 IntegerStyle Style, bool IsNegative) { in write_unsigned_impl()
65 if (Len < MinDigits && Style != IntegerStyle::Number) { in write_unsigned_impl()
70 if (Style == IntegerStyle::Number) { in write_unsigned_impl()
79 IntegerStyle Style, bool IsNegative = false) { in write_unsigned()
82 write_unsigned_impl(S, static_cast<uint32_t>(N), MinDigits, Style, in write_unsigned()
85 write_unsigned_impl(S, N, MinDigits, Style, IsNegative); in write_unsigned()
90 IntegerStyle Style) { in write_signed()
96 write_unsigned(S, static_cast<UnsignedT>(N), MinDigits, Style); in write_signed()
101 write_unsigned(S, UN, MinDigits, Style, true); in write_signed()
105 IntegerStyle Style) { in write_integer()
57 write_unsigned_impl(raw_ostream & S,T N,size_t MinDigits,IntegerStyle Style,bool IsNegative) write_unsigned_impl() argument
80 write_unsigned(raw_ostream & S,T N,size_t MinDigits,IntegerStyle Style,bool IsNegative=false) write_unsigned() argument
91 write_signed(raw_ostream & S,T N,size_t MinDigits,IntegerStyle Style) write_signed() argument
106 write_integer(raw_ostream & S,unsigned int N,size_t MinDigits,IntegerStyle Style) write_integer() argument
111 write_integer(raw_ostream & S,int N,size_t MinDigits,IntegerStyle Style) write_integer() argument
116 write_integer(raw_ostream & S,unsigned long N,size_t MinDigits,IntegerStyle Style) write_integer() argument
121 write_integer(raw_ostream & S,long N,size_t MinDigits,IntegerStyle Style) write_integer() argument
126 write_integer(raw_ostream & S,unsigned long long N,size_t MinDigits,IntegerStyle Style) write_integer() argument
131 write_integer(raw_ostream & S,long long N,size_t MinDigits,IntegerStyle Style) write_integer() argument
135 write_hex(raw_ostream & S,uint64_t N,HexPrintStyle Style,std::optional<size_t> Width) write_hex() argument
165 write_double(raw_ostream & S,double N,FloatStyle Style,std::optional<size_t> Precision) write_double() argument
255 getDefaultPrecision(FloatStyle Style) getDefaultPrecision() argument
[all...]

12345678910>>...14