aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Format/Format.cpp4
-rw-r--r--lib/Format/UnwrappedLineParser.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index 4b994e3b75..999d6210fc 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -952,10 +952,10 @@ public:
return false;
}
break;
- case tok::l_paren: {
+ case tok::l_paren:
if (!parseParens())
return false;
- } break;
+ break;
case tok::l_square:
if (!parseSquare())
return false;
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp
index 89ab0ed169..1f71b5b7da 100644
--- a/lib/Format/UnwrappedLineParser.cpp
+++ b/lib/Format/UnwrappedLineParser.cpp
@@ -487,6 +487,8 @@ void UnwrappedLineParser::parseLabel() {
--Line->Level;
if (FormatTok.Tok.is(tok::l_brace)) {
parseBlock();
+ if (FormatTok.Tok.is(tok::kw_break))
+ parseStructuralElement(); // "break;" after "}" goes on the same line.
}
addUnwrappedLine();
Line->Level = OldLineLevel;