summaryrefslogtreecommitdiffstats
path: root/clang/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
commit22cf462234e4b634a301636df0e6e24b41a15035 (patch)
treed13850c74985a1475c071244d4a726c10b8dc2fd /clang/lib/Format/UnwrappedLineParser.cpp
parent953fb087e5ee32e8f2cc696ea54995bf6c4ce9b1 (diff)
downloadbcm5719-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/lib/Format/UnwrappedLineParser.cpp')
-rw-r--r--clang/lib/Format/UnwrappedLineParser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp
index 0c8ff890491..b3671b30409 100644
--- a/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud