[PATCH] D65631: [clang-format] Fix a bug that doesn't break braces before unions for Allman
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 1 21:32:52 PDT 2019
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL367648: [clang-format] Fix a bug that doesn't break braces before unions for Allman (authored by owenpan, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D65631?vs=212964&id=212966#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65631/new/
https://reviews.llvm.org/D65631
Files:
cfe/trunk/lib/Format/Format.cpp
cfe/trunk/unittests/Format/FormatTest.cpp
Index: cfe/trunk/lib/Format/Format.cpp
===================================================================
--- cfe/trunk/lib/Format/Format.cpp
+++ cfe/trunk/lib/Format/Format.cpp
@@ -640,6 +640,7 @@
Expanded.BraceWrapping.AfterNamespace = true;
Expanded.BraceWrapping.AfterObjCDeclaration = true;
Expanded.BraceWrapping.AfterStruct = true;
+ Expanded.BraceWrapping.AfterUnion = true;
Expanded.BraceWrapping.AfterExternBlock = true;
Expanded.BraceWrapping.BeforeCatch = true;
Expanded.BraceWrapping.BeforeElse = true;
Index: cfe/trunk/unittests/Format/FormatTest.cpp
===================================================================
--- cfe/trunk/unittests/Format/FormatTest.cpp
+++ cfe/trunk/unittests/Format/FormatTest.cpp
@@ -11086,6 +11086,9 @@
"{\n"
" int x;\n"
"};\n"
+ "union C\n"
+ "{\n"
+ "};\n"
"} // namespace a",
AllmanBraceStyle);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65631.212966.patch
Type: text/x-patch
Size: 1003 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190802/15c16476/attachment.bin>
More information about the cfe-commits
mailing list