summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index ee9172227b0..58a1eeb5a6d 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -1061,6 +1061,7 @@ void TokenAnnotator::calculateFormattingInformation(AnnotatedLine &Line) {
Style.BreakConstructorInitializersBeforeComma) {
Current->MustBreakBefore = true;
} else if (Current->Previous->BlockKind == BK_Block &&
+ Current->Previous->isNot(tok::r_brace) &&
Current->isNot(tok::r_brace)) {
Current->MustBreakBefore = true;
} else if (Current->is(tok::l_brace) && (Current->BlockKind == BK_Block)) {
OpenPOWER on IntegriCloud