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()) {
293 FormatStyle AllowsMergedIf = getLLVMStyle();
336 FormatStyle AllowsMergedLoops = getLLVMStyle();
359 FormatStyle AllowSimpleBracedStatements = getLLVMStyle();
500 FormatStyle NoBinPacking = getLLVMStyle();
1049 FormatStyle NoBinPacking = getLLVMStyle();
1278 FormatStyle Pragmas = getLLVMStyleWithColumns(30);
2030 FormatStyle Style = getLLVMStyle();
2031 Style.NamespaceIndentation = FormatStyle::NI_All;
2046 Style.NamespaceIndentation = FormatStyle::NI_Inner;
2112 FormatStyle Style = getLLVMStyle();
2113 Style.BreakBeforeBraces = FormatStyle::BS_Attach;
2120 Style.BreakBeforeBraces = FormatStyle::BS_Stroustrup;
2128 Style.BreakBeforeBraces = FormatStyle::BS_Allman;
2138 Style.BreakBeforeBraces = FormatStyle::BS_GNU;
2762 FormatStyle SingleLine = getLLVMStyle();
2876 FormatStyle Style = getGoogleStyle();
3065 FormatStyle OnePerLine = getLLVMStyle();
3116 FormatStyle Style = getLLVMStyle();
3222 FormatStyle OnePerLine = getLLVMStyle();
3326 FormatStyle OnePerLine = getLLVMStyle();
3448 FormatStyle Style = getGoogleStyle();
3494 Style.BreakBeforeBraces = FormatStyle::BS_Allman;
3611 FormatStyle NoBinPacking = getGoogleStyle();
3674 FormatStyle Style = getLLVMStyleWithColumns(15);
3945 FormatStyle NoBinPacking = getLLVMStyle();
3967 FormatStyle Style = getLLVMStyle();
4144 FormatStyle NoBreak = getLLVMStyle();
4146 FormatStyle Break = getLLVMStyle();
4392 FormatStyle NoBinPacking = getLLVMStyle();
4471 FormatStyle AlwaysBreak = getLLVMStyle();
4592 FormatStyle Style = getLLVMStyle();
4593 Style.PointerAlignment = FormatStyle::PAS_Left;
4833 FormatStyle PointerLeft = getLLVMStyle();
4834 PointerLeft.PointerAlignment = FormatStyle::PAS_Left;
4872 FormatStyle PointerMiddle = getLLVMStyle();
4873 PointerMiddle.PointerAlignment = FormatStyle::PAS_Middle;
4900 FormatStyle PointersLeft = getLLVMStyle();
4901 PointersLeft.PointerAlignment = FormatStyle::PAS_Left;
5088 FormatStyle Indented = getLLVMStyle();
5203 FormatStyle Style = getLLVMStyle();
5214 FormatStyle NoBinPacking = getLLVMStyle();
5376 FormatStyle NoBinPacking = getLLVMStyle();
5435 FormatStyle ExtraSpaces = getLLVMStyle();
5565 FormatStyle DoNotMerge = getLLVMStyle();
5566 DoNotMerge.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_None;
5611 FormatStyle NoColumnLimit = getLLVMStyle();
5622 FormatStyle DoNotMergeNoColumnLimit = NoColumnLimit;
5624 FormatStyle::SFS_None;
5655 FormatStyle MergeInlineOnly = getLLVMStyle();
5656 MergeInlineOnly.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline;
5747 FormatStyle AllowsMergedIf = getGoogleStyle();
5754 FormatStyle ShortMergedIf = AllowsMergedIf;
5853 FormatStyle NoBinPacking = getLLVMStyle();
6141 FormatStyle OnePerLine = getGoogleStyle();
6407 getChromiumStyle(FormatStyle::LK_Cpp));
6905 FormatStyle AlignLeft = getLLVMStyleWithColumns(12);
6965 FormatStyle Style = getLLVMStyleWithColumns(20);
7056 FormatStyle Style = getLLVMStyle();
7057 Style.Standard = FormatStyle::LS_Cpp03;
7180 FormatStyle EightIndent = getLLVMStyleWithColumns(18);
7208 FormatStyle Tab = getLLVMStyleWithColumns(42);
7210 Tab.UseTab = FormatStyle::UT_Always;
7310 Tab.UseTab = FormatStyle::UT_ForIndentation;
7413 Tab.UseTab = FormatStyle::UT_Never;
7492 FormatStyle NoSpace = getLLVMStyle();
7493 NoSpace.SpaceBeforeParens = FormatStyle::SBPO_Never;
7511 FormatStyle Space = getLLVMStyle();
7512 Space.SpaceBeforeParens = FormatStyle::SBPO_Always;
7549 FormatStyle Spaces = getLLVMStyle();
7614 FormatStyle Spaces = getLLVMStyle();
7622 FormatStyle BreakBeforeBrace = getLLVMStyle();
7623 BreakBeforeBrace.BreakBeforeBraces = FormatStyle::BS_Linux;
7642 FormatStyle BreakBeforeBrace = getLLVMStyle();
7643 BreakBeforeBrace.BreakBeforeBraces = FormatStyle::BS_Stroustrup;
7690 FormatStyle BreakBeforeBrace = getLLVMStyle();
7691 BreakBeforeBrace.BreakBeforeBraces = FormatStyle::BS_Allman;
7840 FormatStyle BreakBeforeBraceShortIfs = BreakBeforeBrace;
7867 FormatStyle GNUBraceStyle = getLLVMStyle();
7868 GNUBraceStyle.BreakBeforeBraces = FormatStyle::BS_GNU;
8015 SmallVector<FormatStyle, 3> Styles;
8019 EXPECT_TRUE(getPredefinedStyle("LLVM", FormatStyle::LK_Cpp, &Styles[1]));
8020 EXPECT_TRUE(getPredefinedStyle("lLvM", FormatStyle::LK_Cpp, &Styles[2]));
8024 EXPECT_TRUE(getPredefinedStyle("Google", FormatStyle::LK_Cpp, &Styles[1]));
8025 EXPECT_TRUE(getPredefinedStyle("gOOgle", FormatStyle::LK_Cpp, &Styles[2]));
8028 Styles[0] = getGoogleStyle(FormatStyle::LK_JavaScript);
8030 getPredefinedStyle("Google", FormatStyle::LK_JavaScript, &Styles[1]));
8032 getPredefinedStyle("gOOgle", FormatStyle::LK_JavaScript, &Styles[2]));
8035 Styles[0] = getChromiumStyle(FormatStyle::LK_Cpp);
8036 EXPECT_TRUE(getPredefinedStyle("Chromium", FormatStyle::LK_Cpp, &Styles[1]));
8037 EXPECT_TRUE(getPredefinedStyle("cHRoMiUM", FormatStyle::LK_Cpp, &Styles[2]));
8041 EXPECT_TRUE(getPredefinedStyle("Mozilla", FormatStyle::LK_Cpp, &Styles[1]));
8042 EXPECT_TRUE(getPredefinedStyle("moZILla", FormatStyle::LK_Cpp, &Styles[2]));
8046 EXPECT_TRUE(getPredefinedStyle("WebKit", FormatStyle::LK_Cpp, &Styles[1]));
8047 EXPECT_TRUE(getPredefinedStyle("wEbKit", FormatStyle::LK_Cpp, &Styles[2]));
8051 EXPECT_TRUE(getPredefinedStyle("GNU", FormatStyle::LK_Cpp, &Styles[1]));
8052 EXPECT_TRUE(getPredefinedStyle("gnU", FormatStyle::LK_Cpp, &Styles[2]));
8055 EXPECT_FALSE(getPredefinedStyle("qwerty", FormatStyle::LK_Cpp, &Styles[0]));
8059 SmallVector<FormatStyle, 8> Styles;
8068 Styles[0] = getGoogleStyle(FormatStyle::LK_JavaScript);
8070 Styles[1].Language = FormatStyle::LK_JavaScript;
8074 Styles[2].Language = FormatStyle::LK_JavaScript;
8080 Styles[3].Language = FormatStyle::LK_JavaScript;
8086 Styles[4].Language = FormatStyle::LK_JavaScript;
8110 FormatStyle Style = {};
8111 Style.Language = FormatStyle::LK_Cpp;
8153 Style.PointerAlignment = FormatStyle::PAS_Middle;
8154 CHECK_PARSE("PointerAlignment: Left", PointerAlignment, FormatStyle::PAS_Left);
8155 CHECK_PARSE("PointerAlignment: Right", PointerAlignment, FormatStyle::PAS_Right);
8156 CHECK_PARSE("PointerAlignment: Middle", PointerAlignment, FormatStyle::PAS_Middle);
8158 Style.Standard = FormatStyle::LS_Auto;
8159 CHECK_PARSE("Standard: Cpp03", Standard, FormatStyle::LS_Cpp03);
8160 CHECK_PARSE("Standard: Cpp11", Standard, FormatStyle::LS_Cpp11);
8161 CHECK_PARSE("Standard: C++03", Standard, FormatStyle::LS_Cpp03);
8162 CHECK_PARSE("Standard: C++11", Standard, FormatStyle::LS_Cpp11);
8163 CHECK_PARSE("Standard: Auto", Standard, FormatStyle::LS_Auto);
8165 Style.UseTab = FormatStyle::UT_ForIndentation;
8166 CHECK_PARSE("UseTab: false", UseTab, FormatStyle::UT_Never);
8167 CHECK_PARSE("UseTab: true", UseTab, FormatStyle::UT_Always);
8168 CHECK_PARSE("UseTab: Never", UseTab, FormatStyle::UT_Never);
8169 CHECK_PARSE("UseTab: ForIndentation", UseTab, FormatStyle::UT_ForIndentation);
8170 CHECK_PARSE("UseTab: Always", UseTab, FormatStyle::UT_Always);
8172 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline;
8174 AllowShortFunctionsOnASingleLine, FormatStyle::SFS_None);
8176 AllowShortFunctionsOnASingleLine, FormatStyle::SFS_All);
8178 AllowShortFunctionsOnASingleLine, FormatStyle::SFS_None);
8180 AllowShortFunctionsOnASingleLine, FormatStyle::SFS_Inline);
8182 AllowShortFunctionsOnASingleLine, FormatStyle::SFS_All);
8184 Style.SpaceBeforeParens = FormatStyle::SBPO_Always;
8186 FormatStyle::SBPO_Never);
8188 FormatStyle::SBPO_Always);
8190 FormatStyle::SBPO_ControlStatements);
8193 FormatStyle::SBPO_Never);
8195 FormatStyle::SBPO_ControlStatements);
8198 FormatStyle BaseStyle = getLLVMStyle();
8202 Style.BreakBeforeBraces = FormatStyle::BS_Stroustrup;
8204 FormatStyle::BS_Attach);
8206 FormatStyle::BS_Linux);
8208 FormatStyle::BS_Stroustrup);
8210 FormatStyle::BS_Allman);
8211 CHECK_PARSE("BreakBeforeBraces: GNU", BreakBeforeBraces, FormatStyle::BS_GNU);
8213 Style.NamespaceIndentation = FormatStyle::NI_All;
8215 FormatStyle::NI_None);
8217 FormatStyle::NI_Inner);
8219 FormatStyle::NI_All);
8233 FormatStyle Style = {};
8234 Style.Language = FormatStyle::LK_Cpp;
8244 EXPECT_EQ(FormatStyle::LK_Cpp, Style.Language);
8246 Style.Language = FormatStyle::LK_JavaScript;
8257 EXPECT_EQ(FormatStyle::LK_JavaScript, Style.Language);
8272 Style.Language = FormatStyle::LK_Cpp;
8291 Style.BreakBeforeBraces = FormatStyle::BS_Linux;
8308 EXPECT_EQ(FormatStyle::BS_Stroustrup, Style.BreakBeforeBraces);
8329 EXPECT_EQ(FormatStyle::LK_Cpp, Style.Language);
8336 FormatStyle Style = {};
8337 Style.Language = FormatStyle::LK_JavaScript;
8351 EXPECT_EQ(FormatStyle::LK_JavaScript, Style.Language);
8355 FormatStyle Style = getLLVMStyle();
8357 FormatStyle ParsedStyle = {};
8358 ParsedStyle.Language = FormatStyle::LK_Cpp;
8486 FormatStyle Style = getLLVMStyle();
8536 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_None;
8547 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_All;
8582 FormatStyle Style = getWebKitStyle();
8938 FormatStyle TwoIndent = getLLVMStyleWithColumns(15);
8946 FormatStyle SixIndent = getLLVMStyleWithColumns(20);
8956 FormatStyle Spaces = getLLVMStyle();
8965 Spaces.Standard = FormatStyle::LS_Cpp03;
8972 Spaces.Standard = FormatStyle::LS_Cpp11;