aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/UnwrappedLineParser.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-01-13 14:39:04 +0000
committerDaniel Jasper <djasper@google.com>2013-01-13 14:39:04 +0000
commit1774603d8b34f86bd254d85a125592fcb323a488 (patch)
treea0dd9f4757033c86799153d3d23749ab83d3f68a /lib/Format/UnwrappedLineParser.cpp
parent700d4e44793697288dd827c272ad363945f590a9 (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 'lib/Format/UnwrappedLineParser.cpp')
-rw-r--r--lib/Format/UnwrappedLineParser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp
index 0c8ff89049..b3671b3040 100644
--- a/lib/Format/UnwrappedLineParser.cpp
+++ b/lib/Format/UnwrappedLineParser.cpp
@@ -317,7 +317,8 @@ void UnwrappedLineParser::parseStructuralElement() {
case tok::kw_enum:
parseEnum();
return;
- case tok::kw_struct: // fallthrough
+ case tok::kw_struct: // fallthrough
+ case tok::kw_union: // fallthrough
case tok::kw_class:
parseStructClassOrBracedList();
return;