Lines Matching refs:FormatStyle

21 FormatStyle getGoogleStyle() { return getGoogleStyle(FormatStyle::LK_Cpp); }  in getGoogleStyle()
32 const FormatStyle &Style = getLLVMStyle(), in format()
51 FormatStyle getLLVMStyleWithColumns(unsigned ColumnLimit) { in getLLVMStyleWithColumns()
52 FormatStyle Style = getLLVMStyle(); in getLLVMStyleWithColumns()
57 FormatStyle getGoogleStyleWithColumns(unsigned ColumnLimit) { in getGoogleStyleWithColumns()
58 FormatStyle Style = getGoogleStyle(); in getGoogleStyleWithColumns()
64 const FormatStyle &Style = getLLVMStyle()) { in verifyFormat()
69 const FormatStyle &Style = getLLVMStyle()) { in verifyIncompleteFormat()
85 const FormatStyle &Style = getLLVMStyle()) { in verifyNoCrash()
293 FormatStyle AllowsMergedIf = getLLVMStyle(); in TEST_F()
332 FormatStyle AllowsMergedLoops = getLLVMStyle(); in TEST_F()
355 FormatStyle AllowSimpleBracedStatements = getLLVMStyle(); in TEST_F()
524 FormatStyle NoBinPacking = getLLVMStyle(); in TEST_F()
746 FormatStyle Style = getLLVMStyle(); in TEST_F()
1112 FormatStyle NoBinPacking = getLLVMStyle(); in TEST_F()
1201 FormatStyle Style = getLLVMStyleWithColumns(20); in TEST_F()
1363 FormatStyle Pragmas = getLLVMStyleWithColumns(30); in TEST_F()
2219 FormatStyle Style = getLLVMStyle(); in TEST_F()
2220 Style.NamespaceIndentation = FormatStyle::NI_All; in TEST_F()
2235 Style.NamespaceIndentation = FormatStyle::NI_Inner; in TEST_F()
2358 FormatStyle Style = getLLVMStyle(); in TEST_F()
2359 for (auto BraceStyle : {FormatStyle::BS_Attach, FormatStyle::BS_Mozilla, in TEST_F()
2360 FormatStyle::BS_WebKit}) { in TEST_F()
2369 Style.BreakBeforeBraces = FormatStyle::BS_Stroustrup; in TEST_F()
2391 Style.BreakBeforeBraces = FormatStyle::BS_Allman; in TEST_F()
2401 Style.BreakBeforeBraces = FormatStyle::BS_GNU; in TEST_F()
2411 Style.BreakBeforeBraces = FormatStyle::BS_Custom; in TEST_F()
2438 FormatStyle Style = getLLVMStyle(); in TEST_F()
2446 Style.BreakBeforeBraces = FormatStyle::BS_Allman; in TEST_F()
2805 getChromiumStyle(FormatStyle::LK_Cpp)); in TEST_F()
3100 FormatStyle SingleLine = getLLVMStyle(); in TEST_F()
3227 FormatStyle Style = getGoogleStyle(); in TEST_F()
3269 FormatStyle Style = getLLVMStyle(); in TEST_F()
3390 FormatStyle OnePerLine = getLLVMStyle(); in TEST_F()
3441 FormatStyle Style = getLLVMStyle(); in TEST_F()
3442 Style.BreakBeforeBinaryOperators = FormatStyle::BOS_All; in TEST_F()
3509 FormatStyle Style = getLLVMStyle(); in TEST_F()
3511 Style.BreakBeforeBinaryOperators = FormatStyle::BOS_NonAssignment; in TEST_F()
3532 Style.AlignAfterOpenBracket = FormatStyle::BAS_DontAlign; in TEST_F()
3541 FormatStyle Style = getLLVMStyle(); in TEST_F()
3542 Style.BreakBeforeBinaryOperators = FormatStyle::BOS_NonAssignment; in TEST_F()
3608 FormatStyle OnePerLine = getLLVMStyle(); in TEST_F()
3717 FormatStyle OnePerLine = getLLVMStyle(); in TEST_F()
3829 FormatStyle Style = getLLVMStyle(); in TEST_F()
3830 Style.PointerAlignment = FormatStyle::PAS_Left; in TEST_F()
3861 FormatStyle Style = getGoogleStyle(); in TEST_F()
3907 Style.BreakBeforeBraces = FormatStyle::BS_Allman; in TEST_F()
4045 FormatStyle NoBinPacking = getGoogleStyle(); in TEST_F()
4060 FormatStyle NoBinPacking = getGoogleStyle(); in TEST_F()
4125 FormatStyle Style = getLLVMStyleWithColumns(15); in TEST_F()
4351 FormatStyle Style = getLLVMStyle(); in TEST_F()
4352 Style.AlignAfterOpenBracket = FormatStyle::BAS_DontAlign; in TEST_F()
4375 Style.AlignAfterOpenBracket = FormatStyle::BAS_AlwaysBreak; in TEST_F()
4397 FormatStyle Style = getLLVMStyleWithColumns(40); in TEST_F()
4401 Style.AlignAfterOpenBracket = FormatStyle::BAS_Align; in TEST_F()
4406 Style.AlignAfterOpenBracket = FormatStyle::BAS_DontAlign; in TEST_F()
4411 Style.AlignAfterOpenBracket = FormatStyle::BAS_DontAlign; in TEST_F()
4502 FormatStyle NoBinPacking = getLLVMStyle(); in TEST_F()
4550 FormatStyle Style = getLLVMStyle(); in TEST_F()
4657 FormatStyle Style = getGoogleStyle(); in TEST_F()
4658 Style.PointerAlignment = FormatStyle::PAS_Left; in TEST_F()
4736 FormatStyle Style = getLLVMStyle(); in TEST_F()
4738 Style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_None; in TEST_F()
4750 Style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_All; in TEST_F()
4769 Style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_TopLevelDefinitions; in TEST_F()
4783 Style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_TopLevel; in TEST_F()
4798 Style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_AllDefinitions; in TEST_F()
4851 Style.BreakBeforeBraces = FormatStyle::BS_Stroustrup; in TEST_F()
4870 FormatStyle NoBreak = getLLVMStyle(); in TEST_F()
4872 FormatStyle Break = getLLVMStyle(); in TEST_F()
5142 FormatStyle NoBinPacking = getLLVMStyle(); in TEST_F()
5231 FormatStyle AlwaysBreak = getLLVMStyle(); in TEST_F()
5311 verifyFormat("A<A>> a;", getChromiumStyle(FormatStyle::LK_Cpp)); in TEST_F()
5363 FormatStyle Style = getLLVMStyle(); in TEST_F()
5364 Style.PointerAlignment = FormatStyle::PAS_Left; in TEST_F()
5472 FormatStyle AlignLeft = getLLVMStyle(); in TEST_F()
5473 AlignLeft.PointerAlignment = FormatStyle::PAS_Left; in TEST_F()
5480 FormatStyle Spaces = getLLVMStyle(); in TEST_F()
5612 FormatStyle Left = getLLVMStyle(); in TEST_F()
5613 Left.PointerAlignment = FormatStyle::PAS_Left; in TEST_F()
5662 FormatStyle PointerLeft = getLLVMStyle(); in TEST_F()
5663 PointerLeft.PointerAlignment = FormatStyle::PAS_Left; in TEST_F()
5715 FormatStyle PointerMiddle = getLLVMStyle(); in TEST_F()
5716 PointerMiddle.PointerAlignment = FormatStyle::PAS_Middle; in TEST_F()
5744 FormatStyle AfterType = getLLVMStyle(); in TEST_F()
5745 AfterType.AlwaysBreakAfterReturnType = FormatStyle::RTBS_AllDefinitions; in TEST_F()
5756 FormatStyle PointersLeft = getLLVMStyle(); in TEST_F()
5757 PointersLeft.PointerAlignment = FormatStyle::PAS_Left; in TEST_F()
5973 FormatStyle Indented = getLLVMStyle(); in TEST_F()
6104 FormatStyle Style = getLLVMStyle(); in TEST_F()
6119 FormatStyle NoBinPacking = getLLVMStyle(); in TEST_F()
6299 FormatStyle NoBinPacking = getLLVMStyle(); in TEST_F()
6372 FormatStyle ExtraSpaces = getLLVMStyle(); in TEST_F()
6544 FormatStyle DoNotMerge = getLLVMStyle(); in TEST_F()
6545 DoNotMerge.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_None; in TEST_F()
6590 FormatStyle NoColumnLimit = getLLVMStyle(); in TEST_F()
6602 FormatStyle DoNotMergeNoColumnLimit = NoColumnLimit; in TEST_F()
6604 FormatStyle::SFS_None; in TEST_F()
6635 FormatStyle MergeInlineOnly = getLLVMStyle(); in TEST_F()
6636 MergeInlineOnly.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline; in TEST_F()
6732 FormatStyle AllowsMergedIf = getGoogleStyle(); in TEST_F()
6739 FormatStyle ShortMergedIf = AllowsMergedIf; in TEST_F()
6838 FormatStyle NoBinPacking = getLLVMStyle(); in TEST_F()
7011 FormatStyle Style = getLLVMStyle(); in TEST_F()
7143 FormatStyle OnePerLine = getGoogleStyle(); in TEST_F()
7289 FormatStyle continuationStyle = getGoogleStyle(); in TEST_F()
7438 getChromiumStyle(FormatStyle::LK_Cpp)); in TEST_F()
7864 FormatStyle AlignLeft = getLLVMStyleWithColumns(12); in TEST_F()
7874 FormatStyle NoEmptyLines = getLLVMStyleWithColumns(80); in TEST_F()
7918 FormatStyle Style = getGoogleStyleWithColumns(15); in TEST_F()
7928 FormatStyle Style = getLLVMStyleWithColumns(20); in TEST_F()
8035 FormatStyle Style = getLLVMStyle(); in TEST_F()
8036 Style.Standard = FormatStyle::LS_Cpp03; in TEST_F()
8149 FormatStyle EightIndent = getLLVMStyleWithColumns(18); in TEST_F()
8177 FormatStyle Tab = getLLVMStyleWithColumns(42); in TEST_F()
8179 Tab.UseTab = FormatStyle::UT_Always; in TEST_F()
8252 Tab.UseTab = FormatStyle::UT_ForIndentation; in TEST_F()
8356 Tab.UseTab = FormatStyle::UT_Never; in TEST_F()
8435 FormatStyle NoSpace = getLLVMStyle(); in TEST_F()
8436 NoSpace.SpaceBeforeParens = FormatStyle::SBPO_Never; in TEST_F()
8470 FormatStyle Space = getLLVMStyle(); in TEST_F()
8471 Space.SpaceBeforeParens = FormatStyle::SBPO_Always; in TEST_F()
8519 FormatStyle Spaces = getLLVMStyle(); in TEST_F()
8627 FormatStyle Spaces = getLLVMStyle(); in TEST_F()
8650 FormatStyle Spaces = getLLVMStyle(); in TEST_F()
8658 FormatStyle Alignment = getLLVMStyle(); in TEST_F()
8786 Alignment.BreakBeforeBinaryOperators = FormatStyle::BOS_All; in TEST_F()
8792 Alignment.BreakBeforeBinaryOperators = FormatStyle::BOS_None; in TEST_F()
8834 FormatStyle Alignment = getLLVMStyle(); in TEST_F()
8980 Alignment.BreakBeforeBinaryOperators = FormatStyle::BOS_All; in TEST_F()
8986 Alignment.BreakBeforeBinaryOperators = FormatStyle::BOS_None; in TEST_F()
9075 FormatStyle LinuxBraceStyle = getLLVMStyle(); in TEST_F()
9076 LinuxBraceStyle.BreakBeforeBraces = FormatStyle::BS_Linux; in TEST_F()
9116 FormatStyle MozillaBraceStyle = getLLVMStyle(); in TEST_F()
9117 MozillaBraceStyle.BreakBeforeBraces = FormatStyle::BS_Mozilla; in TEST_F()
9160 FormatStyle StroustrupBraceStyle = getLLVMStyle(); in TEST_F()
9161 StroustrupBraceStyle.BreakBeforeBraces = FormatStyle::BS_Stroustrup; in TEST_F()
9222 FormatStyle AllmanBraceStyle = getLLVMStyle(); in TEST_F()
9223 AllmanBraceStyle.BreakBeforeBraces = FormatStyle::BS_Allman; in TEST_F()
9381 FormatStyle BreakBeforeBraceShortIfs = AllmanBraceStyle; in TEST_F()
9408 FormatStyle GNUBraceStyle = getLLVMStyle(); in TEST_F()
9409 GNUBraceStyle.BreakBeforeBraces = FormatStyle::BS_GNU; in TEST_F()
9532 FormatStyle WebKitBraceStyle = getLLVMStyle(); in TEST_F()
9533 WebKitBraceStyle.BreakBeforeBraces = FormatStyle::BS_WebKit; in TEST_F()
9600 SmallVector<FormatStyle, 3> Styles; in TEST_F()
9604 EXPECT_TRUE(getPredefinedStyle("LLVM", FormatStyle::LK_Cpp, &Styles[1])); in TEST_F()
9605 EXPECT_TRUE(getPredefinedStyle("lLvM", FormatStyle::LK_Cpp, &Styles[2])); in TEST_F()
9609 EXPECT_TRUE(getPredefinedStyle("Google", FormatStyle::LK_Cpp, &Styles[1])); in TEST_F()
9610 EXPECT_TRUE(getPredefinedStyle("gOOgle", FormatStyle::LK_Cpp, &Styles[2])); in TEST_F()
9613 Styles[0] = getGoogleStyle(FormatStyle::LK_JavaScript); in TEST_F()
9615 getPredefinedStyle("Google", FormatStyle::LK_JavaScript, &Styles[1])); in TEST_F()
9617 getPredefinedStyle("gOOgle", FormatStyle::LK_JavaScript, &Styles[2])); in TEST_F()
9620 Styles[0] = getChromiumStyle(FormatStyle::LK_Cpp); in TEST_F()
9621 EXPECT_TRUE(getPredefinedStyle("Chromium", FormatStyle::LK_Cpp, &Styles[1])); in TEST_F()
9622 EXPECT_TRUE(getPredefinedStyle("cHRoMiUM", FormatStyle::LK_Cpp, &Styles[2])); in TEST_F()
9626 EXPECT_TRUE(getPredefinedStyle("Mozilla", FormatStyle::LK_Cpp, &Styles[1])); in TEST_F()
9627 EXPECT_TRUE(getPredefinedStyle("moZILla", FormatStyle::LK_Cpp, &Styles[2])); in TEST_F()
9631 EXPECT_TRUE(getPredefinedStyle("WebKit", FormatStyle::LK_Cpp, &Styles[1])); in TEST_F()
9632 EXPECT_TRUE(getPredefinedStyle("wEbKit", FormatStyle::LK_Cpp, &Styles[2])); in TEST_F()
9636 EXPECT_TRUE(getPredefinedStyle("GNU", FormatStyle::LK_Cpp, &Styles[1])); in TEST_F()
9637 EXPECT_TRUE(getPredefinedStyle("gnU", FormatStyle::LK_Cpp, &Styles[2])); in TEST_F()
9640 EXPECT_FALSE(getPredefinedStyle("qwerty", FormatStyle::LK_Cpp, &Styles[0])); in TEST_F()
9644 SmallVector<FormatStyle, 8> Styles; in TEST_F()
9653 Styles[0] = getGoogleStyle(FormatStyle::LK_JavaScript); in TEST_F()
9655 Styles[1].Language = FormatStyle::LK_JavaScript; in TEST_F()
9659 Styles[2].Language = FormatStyle::LK_JavaScript; in TEST_F()
9666 Styles[3].Language = FormatStyle::LK_JavaScript; in TEST_F()
9673 Styles[4].Language = FormatStyle::LK_JavaScript; in TEST_F()
9714 FormatStyle Style = {}; in TEST_F()
9715 Style.Language = FormatStyle::LK_Cpp; in TEST_F()
9768 FormatStyle Style = {}; in TEST_F()
9769 Style.Language = FormatStyle::LK_Cpp; in TEST_F()
9786 Style.PointerAlignment = FormatStyle::PAS_Middle; in TEST_F()
9788 FormatStyle::PAS_Left); in TEST_F()
9790 FormatStyle::PAS_Right); in TEST_F()
9792 FormatStyle::PAS_Middle); in TEST_F()
9795 FormatStyle::PAS_Left); in TEST_F()
9797 FormatStyle::PAS_Right); in TEST_F()
9799 FormatStyle::PAS_Middle); in TEST_F()
9801 Style.Standard = FormatStyle::LS_Auto; in TEST_F()
9802 CHECK_PARSE("Standard: Cpp03", Standard, FormatStyle::LS_Cpp03); in TEST_F()
9803 CHECK_PARSE("Standard: Cpp11", Standard, FormatStyle::LS_Cpp11); in TEST_F()
9804 CHECK_PARSE("Standard: C++03", Standard, FormatStyle::LS_Cpp03); in TEST_F()
9805 CHECK_PARSE("Standard: C++11", Standard, FormatStyle::LS_Cpp11); in TEST_F()
9806 CHECK_PARSE("Standard: Auto", Standard, FormatStyle::LS_Auto); in TEST_F()
9808 Style.BreakBeforeBinaryOperators = FormatStyle::BOS_All; in TEST_F()
9810 BreakBeforeBinaryOperators, FormatStyle::BOS_NonAssignment); in TEST_F()
9812 FormatStyle::BOS_None); in TEST_F()
9814 FormatStyle::BOS_All); in TEST_F()
9817 FormatStyle::BOS_None); in TEST_F()
9819 FormatStyle::BOS_All); in TEST_F()
9821 Style.AlignAfterOpenBracket = FormatStyle::BAS_AlwaysBreak; in TEST_F()
9823 FormatStyle::BAS_Align); in TEST_F()
9825 FormatStyle::BAS_DontAlign); in TEST_F()
9827 FormatStyle::BAS_AlwaysBreak); in TEST_F()
9830 FormatStyle::BAS_DontAlign); in TEST_F()
9832 FormatStyle::BAS_Align); in TEST_F()
9834 Style.UseTab = FormatStyle::UT_ForIndentation; in TEST_F()
9835 CHECK_PARSE("UseTab: Never", UseTab, FormatStyle::UT_Never); in TEST_F()
9836 CHECK_PARSE("UseTab: ForIndentation", UseTab, FormatStyle::UT_ForIndentation); in TEST_F()
9837 CHECK_PARSE("UseTab: Always", UseTab, FormatStyle::UT_Always); in TEST_F()
9839 CHECK_PARSE("UseTab: false", UseTab, FormatStyle::UT_Never); in TEST_F()
9840 CHECK_PARSE("UseTab: true", UseTab, FormatStyle::UT_Always); in TEST_F()
9842 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline; in TEST_F()
9844 AllowShortFunctionsOnASingleLine, FormatStyle::SFS_None); in TEST_F()
9846 AllowShortFunctionsOnASingleLine, FormatStyle::SFS_Inline); in TEST_F()
9848 AllowShortFunctionsOnASingleLine, FormatStyle::SFS_Empty); in TEST_F()
9850 AllowShortFunctionsOnASingleLine, FormatStyle::SFS_All); in TEST_F()
9853 AllowShortFunctionsOnASingleLine, FormatStyle::SFS_None); in TEST_F()
9855 AllowShortFunctionsOnASingleLine, FormatStyle::SFS_All); in TEST_F()
9857 Style.SpaceBeforeParens = FormatStyle::SBPO_Always; in TEST_F()
9859 FormatStyle::SBPO_Never); in TEST_F()
9861 FormatStyle::SBPO_Always); in TEST_F()
9863 FormatStyle::SBPO_ControlStatements); in TEST_F()
9866 FormatStyle::SBPO_Never); in TEST_F()
9868 FormatStyle::SBPO_ControlStatements); in TEST_F()
9871 FormatStyle BaseStyle = getLLVMStyle(); in TEST_F()
9875 Style.BreakBeforeBraces = FormatStyle::BS_Stroustrup; in TEST_F()
9877 FormatStyle::BS_Attach); in TEST_F()
9879 FormatStyle::BS_Linux); in TEST_F()
9881 FormatStyle::BS_Mozilla); in TEST_F()
9883 FormatStyle::BS_Stroustrup); in TEST_F()
9885 FormatStyle::BS_Allman); in TEST_F()
9886 CHECK_PARSE("BreakBeforeBraces: GNU", BreakBeforeBraces, FormatStyle::BS_GNU); in TEST_F()
9888 FormatStyle::BS_WebKit); in TEST_F()
9890 FormatStyle::BS_Custom); in TEST_F()
9892 Style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_All; in TEST_F()
9894 FormatStyle::RTBS_None); in TEST_F()
9896 FormatStyle::RTBS_All); in TEST_F()
9898 AlwaysBreakAfterReturnType, FormatStyle::RTBS_TopLevel); in TEST_F()
9900 AlwaysBreakAfterReturnType, FormatStyle::RTBS_AllDefinitions); in TEST_F()
9903 FormatStyle::RTBS_TopLevelDefinitions); in TEST_F()
9905 Style.AlwaysBreakAfterDefinitionReturnType = FormatStyle::DRTBS_All; in TEST_F()
9907 AlwaysBreakAfterDefinitionReturnType, FormatStyle::DRTBS_None); in TEST_F()
9909 AlwaysBreakAfterDefinitionReturnType, FormatStyle::DRTBS_All); in TEST_F()
9912 FormatStyle::DRTBS_TopLevel); in TEST_F()
9914 Style.NamespaceIndentation = FormatStyle::NI_All; in TEST_F()
9916 FormatStyle::NI_None); in TEST_F()
9918 FormatStyle::NI_Inner); in TEST_F()
9920 FormatStyle::NI_All); in TEST_F()
9935 std::vector<FormatStyle::IncludeCategory> ExpectedCategories = {{"abc/.*", 2}, in TEST_F()
9946 FormatStyle Style = {}; in TEST_F()
9947 Style.Language = FormatStyle::LK_Cpp; in TEST_F()
9957 EXPECT_EQ(FormatStyle::LK_Cpp, Style.Language); in TEST_F()
9959 Style.Language = FormatStyle::LK_JavaScript; in TEST_F()
9970 EXPECT_EQ(FormatStyle::LK_JavaScript, Style.Language); in TEST_F()
9985 Style.Language = FormatStyle::LK_Cpp; in TEST_F()
10004 Style.BreakBeforeBraces = FormatStyle::BS_Linux; in TEST_F()
10021 EXPECT_EQ(FormatStyle::BS_Stroustrup, Style.BreakBeforeBraces); in TEST_F()
10042 EXPECT_EQ(FormatStyle::LK_Cpp, Style.Language); in TEST_F()
10048 FormatStyle Style = {}; in TEST_F()
10049 Style.Language = FormatStyle::LK_JavaScript; in TEST_F()
10065 EXPECT_EQ(FormatStyle::LK_JavaScript, Style.Language); in TEST_F()
10069 FormatStyle Style = getLLVMStyle(); in TEST_F()
10071 FormatStyle ParsedStyle = {}; in TEST_F()
10072 ParsedStyle.Language = FormatStyle::LK_Cpp; in TEST_F()
10202 FormatStyle Style = getLLVMStyle(); in TEST_F()
10227 FormatStyle Style = getLLVMStyle(); in TEST_F()
10255 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_None; in TEST_F()
10266 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_All; in TEST_F()
10306 FormatStyle Style = getWebKitStyle(); in TEST_F()
10599 FormatStyle ShortBlocks = getLLVMStyle(); in TEST_F()
10691 FormatStyle FourIndent = getLLVMStyle(); in TEST_F()
10700 FormatStyle ZeroColumn = getLLVMStyle(); in TEST_F()
10820 FormatStyle TwoIndent = getLLVMStyleWithColumns(15); in TEST_F()
10828 FormatStyle SixIndent = getLLVMStyleWithColumns(20); in TEST_F()
10838 FormatStyle Spaces = getLLVMStyle(); in TEST_F()
10850 Spaces.Standard = FormatStyle::LS_Cpp03; in TEST_F()
10857 Spaces.Standard = FormatStyle::LS_Cpp11; in TEST_F()