[PATCH] D127484: [clang-format] Use tabs on GNU style
Tsukasa OI via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 10 18:02:57 PDT 2022
a4lg updated this revision to Diff 436087.
a4lg added a comment.
Thanks, suggestion by @owenpan is applied.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127484/new/
https://reviews.llvm.org/D127484
Files:
clang/lib/Format/Format.cpp
clang/unittests/Format/FormatTest.cpp
Index: clang/unittests/Format/FormatTest.cpp
===================================================================
--- clang/unittests/Format/FormatTest.cpp
+++ 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 bar ();\n"
+ "\t}\n"
+ " }\n"
+ "}",
+ Style);
}
TEST_F(FormatTest, MozillaDefaultStyle) {
FormatStyle Style = getMozillaStyle();
Index: clang/lib/Format/Format.cpp
===================================================================
--- clang/lib/Format/Format.cpp
+++ 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;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127484.436087.patch
Type: text/x-patch
Size: 1157 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220611/5dcf2f1d/attachment-0001.bin>
More information about the cfe-commits
mailing list