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 | 1774603d8b34f86bd254d85a125592fcb323a488 (patch) | |
tree | a0dd9f4757033c86799153d3d23749ab83d3f68a /unittests/Format/FormatTest.cpp | |
parent | 700d4e44793697288dd827c272ad363945f590a9 (diff) |
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;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172355 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index a46c9b685b..f3da5061f2 100644 --- a/unittests/Format/FormatTest.cpp +++ b/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) { |