Lines Matching refs:Style
32 const FormatStyle &Style = getLLVMStyle(),
39 reformat(Style, Code, Ranges, "<stdin>", &IncompleteFormat);
52 FormatStyle Style = getLLVMStyle();
53 Style.ColumnLimit = ColumnLimit;
54 return Style;
58 FormatStyle Style = getGoogleStyle();
59 Style.ColumnLimit = ColumnLimit;
60 return Style;
64 const FormatStyle &Style = getLLVMStyle()) {
65 EXPECT_EQ(Code.str(), format(test::messUp(Code), Style));
69 const FormatStyle &Style = getLLVMStyle()) {
71 format(test::messUp(Code), Style, IC_ExpectIncomplete));
85 const FormatStyle &Style = getLLVMStyle()) {
86 format(Code, Style, IC_DoNotCheck);
746 FormatStyle Style = getLLVMStyle();
747 Style.AllowShortCaseLabelsOnASingleLine = true;
764 Style);
770 Style);
785 Style);
786 Style.ColumnLimit = 21;
797 Style);
1201 FormatStyle Style = getLLVMStyleWithColumns(20);
1202 Style.ReflowComments = false;
1203 verifyFormat("// aaaaaaaaa aaaaaaaaaa aaaaaaaaaa", Style);
1204 verifyFormat("/* aaaaaaaaa aaaaaaaaaa aaaaaaaaaa */", Style);
2219 FormatStyle Style = getLLVMStyle();
2220 Style.NamespaceIndentation = FormatStyle::NI_All;
2233 Style));
2235 Style.NamespaceIndentation = FormatStyle::NI_Inner;
2248 Style));
2358 FormatStyle Style = getLLVMStyle();
2361 Style.BreakBeforeBraces = BraceStyle;
2367 Style);
2369 Style.BreakBeforeBraces = FormatStyle::BS_Stroustrup;
2376 Style);
2383 Style);
2390 Style);
2391 Style.BreakBeforeBraces = FormatStyle::BS_Allman;
2400 Style);
2401 Style.BreakBeforeBraces = FormatStyle::BS_GNU;
2410 Style);
2411 Style.BreakBeforeBraces = FormatStyle::BS_Custom;
2412 Style.BraceWrapping.BeforeCatch = true;
2419 Style);
2438 FormatStyle Style = getLLVMStyle();
2445 Style);
2446 Style.BreakBeforeBraces = FormatStyle::BS_Allman;
2455 Style);
3227 FormatStyle Style = getGoogleStyle();
3228 Style.ColumnLimit = 45;
3234 Style);
3269 FormatStyle Style = getLLVMStyle();
3270 Style.MacroBlockBegin = "^[A-Z_]+_BEGIN$";
3271 Style.MacroBlockEnd = "^[A-Z_]+_END$";
3274 "FOO_END", Style);
3279 Style);
3283 "FOO_END(Baz)", Style);
3441 FormatStyle Style = getLLVMStyle();
3442 Style.BreakBeforeBinaryOperators = FormatStyle::BOS_All;
3453 Style);
3458 Style);
3463 Style);
3468 Style);
3474 Style);
3478 Style);
3483 Style);
3487 Style);
3499 Style);
3501 Style.ColumnLimit = 60;
3505 Style);
3509 FormatStyle Style = getLLVMStyle();
3510 Style.AlignOperands = false;
3511 Style.BreakBeforeBinaryOperators = FormatStyle::BOS_NonAssignment;
3521 Style);
3526 Style);
3530 Style);
3532 Style.AlignAfterOpenBracket = FormatStyle::BAS_DontAlign;
3537 Style);
3541 FormatStyle Style = getLLVMStyle();
3542 Style.BreakBeforeBinaryOperators = FormatStyle::BOS_NonAssignment;
3546 Style);
3829 FormatStyle Style = getLLVMStyle();
3830 Style.PointerAlignment = FormatStyle::PAS_Left;
3833 Style);
3836 Style);
3861 FormatStyle Style = getGoogleStyle();
3862 Style.ColumnLimit = 47;
3871 Style);
3890 Style);
3893 Style);
3896 Style);
3899 Style);
3902 Style);
3905 Style);
3907 Style.BreakBeforeBraces = FormatStyle::BS_Allman;
3912 Style);
4125 FormatStyle Style = getLLVMStyleWithColumns(15);
4126 Style.ExperimentalAutoDetectBinPacking = true;
4137 Style));
4145 Style));
4351 FormatStyle Style = getLLVMStyle();
4352 Style.AlignAfterOpenBracket = FormatStyle::BAS_DontAlign;
4355 Style);
4358 Style);
4361 Style);
4365 Style);
4369 Style);
4373 Style);
4375 Style.AlignAfterOpenBracket = FormatStyle::BAS_AlwaysBreak;
4376 Style.BinPackArguments = false;
4377 Style.BinPackParameters = false;
4382 Style);
4387 Style);
4393 Style);
4397 FormatStyle Style = getLLVMStyleWithColumns(40);
4400 Style);
4401 Style.AlignAfterOpenBracket = FormatStyle::BAS_Align;
4402 Style.AlignOperands = false;
4405 Style);
4406 Style.AlignAfterOpenBracket = FormatStyle::BAS_DontAlign;
4407 Style.AlignOperands = true;
4410 Style);
4411 Style.AlignAfterOpenBracket = FormatStyle::BAS_DontAlign;
4412 Style.AlignOperands = false;
4415 Style);
4550 FormatStyle Style = getLLVMStyle();
4551 Style.BreakBeforeTernaryOperators = false;
4552 Style.ColumnLimit = 70;
4557 Style);
4561 Style);
4565 Style);
4571 Style);
4576 Style);
4582 Style);
4590 Style);
4596 Style);
4600 Style);
4605 Style);
4610 Style);
4615 Style);
4622 Style);
4628 Style);
4634 Style);
4657 FormatStyle Style = getGoogleStyle();
4658 Style.PointerAlignment = FormatStyle::PAS_Left;
4659 Style.DerivePointerAlignment = false;
4663 Style);
4666 Style);
4736 FormatStyle Style = getLLVMStyle();
4738 Style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_None;
4745 Style);
4750 Style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_All;
4765 Style);
4769 Style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_TopLevelDefinitions;
4779 Style);
4783 Style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_TopLevel;
4794 Style);
4798 Style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_AllDefinitions;
4811 Style);
4817 Style);
4824 Style);
4835 Style);
4842 Style);
4844 Style);
4847 Style);
4850 Style);
4851 Style.BreakBeforeBraces = FormatStyle::BS_Stroustrup;
4858 Style);
4866 Style);
5363 FormatStyle Style = getLLVMStyle();
5364 Style.PointerAlignment = FormatStyle::PAS_Left;
5365 verifyFormat("typedef bool* (Class::*Member)() const;", Style);
6104 FormatStyle Style = getLLVMStyle();
6105 Style.AlwaysBreakBeforeMultilineStrings = true;
6106 Style.ColumnLimit = 0;
6107 verifyFormat("#import \"abc.h\"", Style);
7011 FormatStyle Style = getLLVMStyle();
7012 Style.IndentWrappedFunctionNames = false;
7017 Style);
7018 Style.IndentWrappedFunctionNames = true;
7023 Style);
7027 // FIXME: In LLVM style, there should be a space in front of a '<' for ObjC
7034 // If there's no return type (very rare in practice!), LLVM and Google style
7837 // Style::AlwaysBreakBeforeMultilineStrings.
7918 FormatStyle Style = getGoogleStyleWithColumns(15);
7919 EXPECT_EQ("R\"x(raw literal)x\";", format("R\"x(raw literal)x\";", Style));
7920 EXPECT_EQ("uR\"x(raw literal)x\";", format("uR\"x(raw literal)x\";", Style));
7921 EXPECT_EQ("LR\"x(raw literal)x\";", format("LR\"x(raw literal)x\";", Style));
7922 EXPECT_EQ("UR\"x(raw literal)x\";", format("UR\"x(raw literal)x\";", Style));
7924 format("u8R\"x(raw literal)x\";", Style));
7928 FormatStyle Style = getLLVMStyleWithColumns(20);
7933 format(" _T(\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\")", Style));
7937 format("f(x, _T(\"aaaaaaaaaaaaaaa\"), z);", Style));
7948 format(" _T ( \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" )", Style));
8035 FormatStyle Style = getLLVMStyle();
8036 Style.Standard = FormatStyle::LS_Cpp03;
8038 format("#define x(_a) printf(\"foo\"_a);", Style));
9596 EXPECT_EQ(Styles[0], Styles[i]) << "Style #" << i << " of " << Styles.size() \
9597 << " differs from Style #0"
9686 Style.FIELD = false; \
9687 EXPECT_EQ(0, parseConfiguration(CONFIG_NAME ": true", &Style).value()); \
9688 EXPECT_TRUE(Style.FIELD); \
9689 EXPECT_EQ(0, parseConfiguration(CONFIG_NAME ": false", &Style).value()); \
9690 EXPECT_FALSE(Style.FIELD);
9695 Style.STRUCT.FIELD = false; \
9697 parseConfiguration(#STRUCT ":\n " CONFIG_NAME ": true", &Style) \
9699 EXPECT_TRUE(Style.STRUCT.FIELD); \
9701 parseConfiguration(#STRUCT ":\n " CONFIG_NAME ": false", &Style) \
9703 EXPECT_FALSE(Style.STRUCT.FIELD);
9709 EXPECT_NE(VALUE, Style.FIELD); \
9710 EXPECT_EQ(0, parseConfiguration(TEXT, &Style).value()); \
9711 EXPECT_EQ(VALUE, Style.FIELD)
9714 FormatStyle Style = {};
9715 Style.Language = FormatStyle::LK_Cpp;
9768 FormatStyle Style = {};
9769 Style.Language = FormatStyle::LK_Cpp;
9786 Style.PointerAlignment = FormatStyle::PAS_Middle;
9801 Style.Standard = FormatStyle::LS_Auto;
9808 Style.BreakBeforeBinaryOperators = FormatStyle::BOS_All;
9821 Style.AlignAfterOpenBracket = FormatStyle::BAS_AlwaysBreak;
9834 Style.UseTab = FormatStyle::UT_ForIndentation;
9842 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline;
9857 Style.SpaceBeforeParens = FormatStyle::SBPO_Always;
9870 Style.ColumnLimit = 123;
9875 Style.BreakBeforeBraces = FormatStyle::BS_Stroustrup;
9892 Style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_All;
9905 Style.AlwaysBreakAfterDefinitionReturnType = FormatStyle::DRTBS_All;
9914 Style.NamespaceIndentation = FormatStyle::NI_All;
9924 Style.ForEachMacros.clear();
9934 Style.IncludeCategories.clear();
9946 FormatStyle Style = {};
9947 Style.Language = FormatStyle::LK_Cpp;
9953 &Style),
9955 EXPECT_EQ(12u, Style.IndentWidth);
9957 EXPECT_EQ(FormatStyle::LK_Cpp, Style.Language);
9959 Style.Language = FormatStyle::LK_JavaScript;
9966 &Style),
9968 EXPECT_EQ(23u, Style.IndentWidth);
9970 EXPECT_EQ(FormatStyle::LK_JavaScript, Style.Language);
9985 Style.Language = FormatStyle::LK_Cpp;
10002 Style.ColumnLimit = 123;
10003 Style.IndentWidth = 234;
10004 Style.BreakBeforeBraces = FormatStyle::BS_Linux;
10005 Style.TabWidth = 345;
10018 &Style));
10019 EXPECT_EQ(123u, Style.ColumnLimit);
10020 EXPECT_EQ(456u, Style.IndentWidth);
10021 EXPECT_EQ(FormatStyle::BS_Stroustrup, Style.BreakBeforeBraces);
10022 EXPECT_EQ(789u, Style.TabWidth);
10030 &Style),
10039 &Style),
10042 EXPECT_EQ(FormatStyle::LK_Cpp, Style.Language);
10048 FormatStyle Style = {};
10049 Style.Language = FormatStyle::LK_JavaScript;
10050 Style.BreakBeforeTernaryOperators = true;
10051 EXPECT_EQ(0, parseConfiguration("BasedOnStyle: Google", &Style).value());
10052 EXPECT_FALSE(Style.BreakBeforeTernaryOperators);
10054 Style.BreakBeforeTernaryOperators = true;
10061 &Style)
10063 EXPECT_FALSE(Style.BreakBeforeTernaryOperators);
10064 EXPECT_EQ(76u, Style.IndentWidth);
10065 EXPECT_EQ(FormatStyle::LK_JavaScript, Style.Language);
10069 FormatStyle Style = getLLVMStyle();
10070 std::string YAML = configurationAsText(Style);
10074 EXPECT_EQ(Style, ParsedStyle);
10202 FormatStyle Style = getLLVMStyle();
10204 Style.ConstructorInitializerIndentWidth = 4;
10209 Style);
10211 Style.ConstructorInitializerIndentWidth = 2;
10216 Style);
10218 Style.ConstructorInitializerIndentWidth = 0;
10223 Style);
10227 FormatStyle Style = getLLVMStyle();
10228 Style.BreakConstructorInitializersBeforeComma = true;
10229 Style.ConstructorInitializerIndentWidth = 4;
10234 Style);
10237 Style);
10239 Style.ColumnLimit = 0;
10242 Style);
10247 Style);
10253 Style);
10255 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_None;
10260 Style);
10263 Style);
10265 Style.ColumnLimit = 80;
10266 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_All;
10267 Style.ConstructorInitializerIndentWidth = 2;
10272 Style);
10274 Style.ConstructorInitializerIndentWidth = 0;
10279 Style);
10281 Style.ConstructorInitializerAllOnOneLineOrOnePerLine = true;
10282 Style.ConstructorInitializerIndentWidth = 4;
10283 verifyFormat("SomeClass::Constructor() : aaaaaaaa(aaaaaaaa) {}", Style);
10286 Style);
10290 Style);
10291 Style.ConstructorInitializerIndentWidth = 4;
10292 Style.ColumnLimit = 60;
10297 Style);
10306 FormatStyle Style = getWebKitStyle();
10318 Style);
10329 Style);
10345 Style));
10348 verifyFormat("void f() { return; }", Style);
10359 Style);
10364 Style);
10369 format("SomeClass::Constructor():a(a){}", Style));
10376 Style);
10383 Style);
10390 Style);
10395 Style);
10400 format("ASSERT ( aaaa\n||bbbb);", Style));
10409 Style));
10413 format("if (aaaaaaaaaaaaaaa || bbbbbbbbbbbbbbb) { i++; }", Style));
10416 verifyFormat("#define aNumber 10", Style);
10422 Style));
10429 Style));
10434 Style));
10447 Style));
10453 Style));
10455 verifyFormat("[self.a b:c c:d];", Style);
10460 Style));