diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -1616,6 +1616,7 @@ Style.FixNamespaceComments = false; Style.SpaceBeforeParens = FormatStyle::SBPO_Always; Style.Standard = FormatStyle::LS_Cpp03; + Style.UseTab = FormatStyle::UT_ForContinuationAndIndentation; return Style; } diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -23944,6 +23944,18 @@ " int foo ();\n" "}", Style); + verifyFormat("void\n" + "foo ()\n" + "{\n" + " for (int i = 0; i < 5; i++)\n" + " {\n" + " for (int j = 0; j < 5; j++)\n" + "\t{\n" + "\t printf (\"%d, %d\\n\", i, j);\n" + "\t}\n" + " }\n" + "}", + Style); } TEST_F(FormatTest, MozillaDefaultStyle) { FormatStyle Style = getMozillaStyle();