diff options
author | Daniel Jasper <djasper@google.com> | 2013-01-13 14:39:04 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-01-13 14:39:04 +0000 |
commit | 22cf462234e4b634a301636df0e6e24b41a15035 (patch) | |
tree | d13850c74985a1475c071244d4a726c10b8dc2fd /clang/unittests/Format/FormatTest.cpp | |
parent | 953fb087e5ee32e8f2cc696ea54995bf6c4ce9b1 (diff) | |
download | bcm5719-llvm-22cf462234e4b634a301636df0e6e24b41a15035.tar.gz bcm5719-llvm-22cf462234e4b634a301636df0e6e24b41a15035.zip |
Format unions like structs and classes.
Note that I don't know whether we should put {} on a single line in this
case, but it is probably a theoretical issue as in practice such
structs, classes or unions won't be empty.
Before: union A {}
a;
After: union A {} a;
llvm-svn: 172355
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index a46c9b685bc..f3da5061f26 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -343,6 +343,7 @@ TEST_F(FormatTest, FormatsDerivedClass) { TEST_F(FormatTest, FormatsVariableDeclarationsAfterStructOrClass) { verifyFormat("class A {} a, b;"); verifyFormat("struct A {} a, b;"); + verifyFormat("union A {} a;"); } TEST_F(FormatTest, FormatsEnum) { |