Home | History | Annotate | Download | only in Format

Lines Matching refs:FormatStyle

20 FormatStyle getGoogleStyle() {
21 return getGoogleStyle(FormatStyle::LK_Cpp);
27 const FormatStyle &Style) {
40 format(llvm::StringRef Code, const FormatStyle &Style = getLLVMStyle()) {
44 FormatStyle getLLVMStyleWithColumns(unsigned ColumnLimit) {
45 FormatStyle Style = getLLVMStyle();
50 FormatStyle getGoogleStyleWithColumns(unsigned ColumnLimit) {
51 FormatStyle Style = getGoogleStyle();
57 const FormatStyle &Style = getLLVMStyle()) {
72 const FormatStyle &Style = getLLVMStyle()) {
335 FormatStyle AllowsMergedIf = getLLVMStyle();
378 FormatStyle AllowsMergedLoops = getLLVMStyle();
401 FormatStyle AllowSimpleBracedStatements = getLLVMStyle();
549 FormatStyle NoBinPacking = getLLVMStyle();
753 FormatStyle Style = getLLVMStyle();
1169 FormatStyle NoBinPacking = getLLVMStyle();
1398 FormatStyle Pragmas = getLLVMStyleWithColumns(30);
2199 FormatStyle Style = getLLVMStyle();
2200 Style.NamespaceIndentation = FormatStyle::NI_All;
2215 Style.NamespaceIndentation = FormatStyle::NI_Inner;
2324 FormatStyle Style = getLLVMStyle();
2325 Style.BreakBeforeBraces = FormatStyle::BS_Attach;
2332 Style.BreakBeforeBraces = FormatStyle::BS_Stroustrup;
2354 Style.BreakBeforeBraces = FormatStyle::BS_Allman;
2364 Style.BreakBeforeBraces = FormatStyle::BS_GNU;
2753 "(n, buffers))\n", getChromiumStyle(FormatStyle::LK_Cpp));
3048 FormatStyle SingleLine = getLLVMStyle();
3174 FormatStyle Style = getGoogleStyle();
3367 FormatStyle OnePerLine = getLLVMStyle();
3418 FormatStyle Style = getLLVMStyle();
3419 Style.BreakBeforeBinaryOperators = FormatStyle::BOS_All;
3481 FormatStyle Style = getLLVMStyle();
3483 Style.BreakBeforeBinaryOperators = FormatStyle::BOS_NonAssignment;
3514 FormatStyle Style = getLLVMStyle();
3515 Style.BreakBeforeBinaryOperators = FormatStyle::BOS_NonAssignment;
3574 FormatStyle OnePerLine = getLLVMStyle();
3678 FormatStyle OnePerLine = getLLVMStyle();
3791 FormatStyle Style = getLLVMStyle();
3792 Style.PointerAlignment = FormatStyle::PAS_Left;
3821 FormatStyle Style = getGoogleStyle();
3867 Style.BreakBeforeBraces = FormatStyle::BS_Allman;
3985 FormatStyle NoBinPacking = getGoogleStyle();
4000 FormatStyle NoBinPacking = getGoogleStyle();
4064 FormatStyle Style = getLLVMStyleWithColumns(15);
4269 FormatStyle Style = getLLVMStyle();
4298 FormatStyle Style = getLLVMStyleWithColumns(40);
4404 FormatStyle NoBinPacking = getLLVMStyle();
4452 FormatStyle Style = getLLVMStyle();
4559 FormatStyle Style = getGoogleStyle();
4560 Style.PointerAlignment = FormatStyle::PAS_Left;
4630 FormatStyle AfterType = getLLVMStyle();
4645 AfterType.BreakBeforeBraces = FormatStyle::BS_Stroustrup;
4664 FormatStyle NoBreak = getLLVMStyle();
4666 FormatStyle Break = getLLVMStyle();
4926 FormatStyle NoBinPacking = getLLVMStyle();
5015 FormatStyle AlwaysBreak = getLLVMStyle();
5093 verifyFormat("A<A>> a;", getChromiumStyle(FormatStyle::LK_Cpp));
5141 FormatStyle Style = getLLVMStyle();
5142 Style.PointerAlignment = FormatStyle::PAS_Left;
5255 FormatStyle Spaces = getLLVMStyle();
5380 FormatStyle Left = getLLVMStyle();
5381 Left.PointerAlignment = FormatStyle::PAS_Left;
5429 FormatStyle PointerLeft = getLLVMStyle();
5430 PointerLeft.PointerAlignment = FormatStyle::PAS_Left;
5481 FormatStyle PointerMiddle = getLLVMStyle();
5482 PointerMiddle.PointerAlignment = FormatStyle::PAS_Middle;
5509 FormatStyle PointersLeft = getLLVMStyle();
5510 PointersLeft.PointerAlignment = FormatStyle::PAS_Left;
5711 FormatStyle Indented = getLLVMStyle();
5834 FormatStyle Style = getLLVMStyle();
5849 FormatStyle
6020 FormatStyle NoBinPacking = getLLVMStyle();
6093 FormatStyle ExtraSpaces = getLLVMStyle();
6216 FormatStyle DoNotMerge = getLLVMStyle();
6217 DoNotMerge.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_None;
6262 FormatStyle NoColumnLimit = getLLVMStyle();
6273 FormatStyle DoNotMergeNoColumnLimit = NoColumnLimit;
6275 FormatStyle::SFS_None;
6306 FormatStyle MergeInlineOnly = getLLVMStyle();
6307 MergeInlineOnly.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline;
6398 FormatStyle AllowsMergedIf = getGoogleStyle();
6405 FormatStyle ShortMergedIf = AllowsMergedIf;
6504 FormatStyle NoBinPacking = getLLVMStyle();
6794 FormatStyle OnePerLine = getGoogleStyle();
7071 getChromiumStyle(FormatStyle::LK_Cpp));
7573 FormatStyle AlignLeft = getLLVMStyleWithColumns(12);
7621 FormatStyle Style = getGoogleStyleWithColumns(15);
7631 FormatStyle Style = getLLVMStyleWithColumns(20);
7738 FormatStyle Style = getLLVMStyle();
7739 Style.Standard = FormatStyle::LS_Cpp03;
7857 FormatStyle EightIndent = getLLVMStyleWithColumns(18);
7885 FormatStyle Tab = getLLVMStyleWithColumns(42);
7887 Tab.UseTab = FormatStyle::UT_Always;
7987 Tab.UseTab = FormatStyle::UT_ForIndentation;
8089 Tab.UseTab = FormatStyle::UT_Never;
8168 FormatStyle NoSpace = getLLVMStyle();
8169 NoSpace.SpaceBeforeParens = FormatStyle::SBPO_Never;
8195 FormatStyle Space = getLLVMStyle();
8196 Space.SpaceBeforeParens = FormatStyle::SBPO_Always;
8241 FormatStyle Spaces = getLLVMStyle();
8338 FormatStyle Spaces = getLLVMStyle();
8361 FormatStyle Spaces = getLLVMStyle();
8369 FormatStyle LinuxBraceStyle = getLLVMStyle();
8370 LinuxBraceStyle.BreakBeforeBraces = FormatStyle::BS_Linux;
8408 FormatStyle StroustrupBraceStyle = getLLVMStyle();
8409 StroustrupBraceStyle.BreakBeforeBraces = FormatStyle::BS_Stroustrup;
8470 FormatStyle AllmanBraceStyle = getLLVMStyle();
8471 AllmanBraceStyle.BreakBeforeBraces = FormatStyle::BS_Allman;
8629 FormatStyle BreakBeforeBraceShortIfs = AllmanBraceStyle;
8656 FormatStyle GNUBraceStyle = getLLVMStyle();
8657 GNUBraceStyle.BreakBeforeBraces = FormatStyle::BS_GNU;
8804 SmallVector<FormatStyle, 3> Styles;
8808 EXPECT_TRUE(getPredefinedStyle("LLVM", FormatStyle::LK_Cpp, &Styles[1]));
8809 EXPECT_TRUE(getPredefinedStyle("lLvM", FormatStyle::LK_Cpp, &Styles[2]));
8813 EXPECT_TRUE(getPredefinedStyle("Google", FormatStyle::LK_Cpp, &Styles[1]));
8814 EXPECT_TRUE(getPredefinedStyle("gOOgle", FormatStyle::LK_Cpp, &Styles[2]));
8817 Styles[0] = getGoogleStyle(FormatStyle::LK_JavaScript);
8819 getPredefinedStyle("Google", FormatStyle::LK_JavaScript, &Styles[1]));
8821 getPredefinedStyle("gOOgle", FormatStyle::LK_JavaScript, &Styles[2]));
8824 Styles[0] = getChromiumStyle(FormatStyle::LK_Cpp);
8825 EXPECT_TRUE(getPredefinedStyle("Chromium", FormatStyle::LK_Cpp, &Styles[1]));
8826 EXPECT_TRUE(getPredefinedStyle("cHRoMiUM", FormatStyle::LK_Cpp, &Styles[2]));
8830 EXPECT_TRUE(getPredefinedStyle("Mozilla", FormatStyle::LK_Cpp, &Styles[1]));
8831 EXPECT_TRUE(getPredefinedStyle("moZILla", FormatStyle::LK_Cpp, &Styles[2]));
8835 EXPECT_TRUE(getPredefinedStyle("WebKit", FormatStyle::LK_Cpp, &Styles[1]));
8836 EXPECT_TRUE(getPredefinedStyle("wEbKit", FormatStyle::LK_Cpp, &Styles[2]));
8840 EXPECT_TRUE(getPredefinedStyle("GNU", FormatStyle::LK_Cpp, &Styles[1]));
8841 EXPECT_TRUE(getPredefinedStyle("gnU", FormatStyle::LK_Cpp, &Styles[2]));
8844 EXPECT_FALSE(getPredefinedStyle("qwerty", FormatStyle::LK_Cpp, &Styles[0]));
8848 SmallVector<FormatStyle, 8> Styles;
8857 Styles[0] = getGoogleStyle(FormatStyle::LK_JavaScript);
8859 Styles[1].Language = FormatStyle::LK_JavaScript;
8863 Styles[2].Language = FormatStyle::LK_JavaScript;
8869 Styles[3].Language = FormatStyle::LK_JavaScript;
8875 Styles[4].Language = FormatStyle::LK_JavaScript;
8901 FormatStyle Style = {};
8902 Style.Language = FormatStyle::LK_Cpp;
8940 FormatStyle Style = {};
8941 Style.Language = FormatStyle::LK_Cpp;
8958 Style.PointerAlignment = FormatStyle::PAS_Middle;
8960 FormatStyle::PAS_Left);
8962 FormatStyle::PAS_Right);
8964 FormatStyle::PAS_Middle);
8967 FormatStyle::PAS_Left);
8969 FormatStyle::PAS_Right);
8971 FormatStyle::PAS_Middle);
8973 Style.Standard = FormatStyle::LS_Auto;
8974 CHECK_PARSE("Standard: Cpp03", Standard, FormatStyle::LS_Cpp03);
8975 CHECK_PARSE("Standard: Cpp11", Standard, FormatStyle::LS_Cpp11);
8976 CHECK_PARSE("Standard: C++03", Standard, FormatStyle::LS_Cpp03);
8977 CHECK_PARSE("Standard: C++11", Standard, FormatStyle::LS_Cpp11);
8978 CHECK_PARSE("Standard: Auto", Standard, FormatStyle::LS_Auto);
8980 Style.BreakBeforeBinaryOperators = FormatStyle::BOS_All;
8982 BreakBeforeBinaryOperators, FormatStyle::BOS_NonAssignment);
8984 FormatStyle::BOS_None);
8986 FormatStyle::BOS_All);
8989 FormatStyle::BOS_None);
8991 FormatStyle::BOS_All);
8993 Style.UseTab = FormatStyle::UT_ForIndentation;
8994 CHECK_PARSE("UseTab: Never", UseTab, FormatStyle::UT_Never);
8995 CHECK_PARSE("UseTab: ForIndentation", UseTab, FormatStyle::UT_ForIndentation);
8996 CHECK_PARSE("UseTab: Always", UseTab, FormatStyle::UT_Always);
8998 CHECK_PARSE("UseTab: false", UseTab, FormatStyle::UT_Never);
8999 CHECK_PARSE("UseTab: true", UseTab, FormatStyle::UT_Always);
9001 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline;
9003 AllowShortFunctionsOnASingleLine, FormatStyle::SFS_None);
9005 AllowShortFunctionsOnASingleLine, FormatStyle::SFS_Inline);
9007 AllowShortFunctionsOnASingleLine, FormatStyle::SFS_Empty);
9009 AllowShortFunctionsOnASingleLine, FormatStyle::SFS_All);
9012 AllowShortFunctionsOnASingleLine, FormatStyle::SFS_None);
9014 AllowShortFunctionsOnASingleLine, FormatStyle::SFS_All);
9016 Style.SpaceBeforeParens = FormatStyle::SBPO_Always;
9018 FormatStyle::SBPO_Never);
9020 FormatStyle::SBPO_Always);
9022 FormatStyle::SBPO_ControlStatements);
9025 FormatStyle::SBPO_Never);
9027 FormatStyle::SBPO_ControlStatements);
9030 FormatStyle BaseStyle = getLLVMStyle();
9034 Style.BreakBeforeBraces = FormatStyle::BS_Stroustrup;
9036 FormatStyle::BS_Attach);
9038 FormatStyle::BS_Linux);
9040 FormatStyle::BS_Stroustrup);
9042 FormatStyle::BS_Allman);
9043 CHECK_PARSE("BreakBeforeBraces: GNU", BreakBeforeBraces, FormatStyle::BS_GNU);
9045 Style.NamespaceIndentation = FormatStyle::NI_All;
9047 FormatStyle::NI_None);
9049 FormatStyle::NI_Inner);
9051 FormatStyle::NI_All);
9065 FormatStyle Style = {};
9066 Style.Language = FormatStyle::LK_Cpp;
9076 EXPECT_EQ(FormatStyle::LK_Cpp, Style.Language);
9078 Style.Language = FormatStyle::LK_JavaScript;
9089 EXPECT_EQ(FormatStyle::LK_JavaScript, Style.Language);
9104 Style.Language = FormatStyle::LK_Cpp;
9123 Style.BreakBeforeBraces = FormatStyle::BS_Linux;
9140 EXPECT_EQ(FormatStyle::BS_Stroustrup, Style.BreakBeforeBraces);
9161 EXPECT_EQ(FormatStyle::LK_Cpp, Style.Language);
9167 FormatStyle Style = {};
9168 Style.Language = FormatStyle::LK_JavaScript;
9182 EXPECT_EQ(FormatStyle::LK_JavaScript, Style.Language);
9186 FormatStyle Style = getLLVMStyle();
9188 FormatStyle ParsedStyle = {};
9189 ParsedStyle.Language = FormatStyle::LK_Cpp;
9317 FormatStyle Style = getLLVMStyle();
9342 FormatStyle Style = getLLVMStyle();
9370 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_None;
9381 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_All;
9421 FormatStyle Style = getWebKitStyle();
9685 FormatStyle ShortBlocks = getLLVMStyle();
9777 FormatStyle FourIndent = getLLVMStyle();
9839 FormatStyle TwoIndent = getLLVMStyleWithColumns(15);
9847 FormatStyle SixIndent = getLLVMStyleWithColumns(20);
9857 FormatStyle Spaces = getLLVMStyle();
9866 Spaces.Standard = FormatStyle::LS_Cpp03;
9873 Spaces.Standard = FormatStyle::LS_Cpp11;