aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/UnwrappedLineParser.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2013-01-16 11:43:46 +0000
committerAlexander Kornienko <alexfh@google.com>2013-01-16 11:43:46 +0000
commitd881875b6c78386c4f0da911c1110f9ed1235c6a (patch)
tree9693a6db6acdb1436a2c0c3134b3f4d99e21b6de /lib/Format/UnwrappedLineParser.cpp
parenta40548c36d91189506cb61fc66ab915fb91906e3 (diff)
Clang Format: Handle missing semicolon
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172606 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/UnwrappedLineParser.cpp')
-rw-r--r--lib/Format/UnwrappedLineParser.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp
index 9a29ff011a..d6c66dc9ac 100644
--- a/lib/Format/UnwrappedLineParser.cpp
+++ b/lib/Format/UnwrappedLineParser.cpp
@@ -306,8 +306,8 @@ void UnwrappedLineParser::parseStructuralElement() {
case tok::kw_enum:
parseEnum();
return;
- case tok::kw_struct: // fallthrough
- case tok::kw_union: // fallthrough
+ case tok::kw_struct:
+ case tok::kw_union:
case tok::kw_class:
parseRecord();
// A record declaration or definition is always the start of a structural
@@ -317,6 +317,9 @@ void UnwrappedLineParser::parseStructuralElement() {
nextToken();
addUnwrappedLine();
return;
+ case tok::r_brace:
+ addUnwrappedLine();
+ return;
case tok::l_paren:
parseParens();
break;