From 22cf462234e4b634a301636df0e6e24b41a15035 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Sun, 13 Jan 2013 14:39:04 +0000 Subject: 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 --- clang/lib/Format/UnwrappedLineParser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Format/UnwrappedLineParser.cpp') 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; -- cgit v1.2.3