summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 2f14fc0ce15..91cbc2efcd4 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -690,7 +690,8 @@ private:
return true;
if (State.NextToken->Parent->is(tok::comma) &&
State.Stack.back().BreakAfterComma &&
- State.NextToken->Type != TT_LineComment)
+ (State.NextToken->isNot(tok::comment) ||
+ !State.NextToken->Children[0].MustBreakBefore))
return true;
if ((State.NextToken->Type == TT_CtorInitializerColon ||
(State.NextToken->Parent->ClosesTemplateDeclaration &&
OpenPOWER on IntegriCloud