clang-format: Allow splitting the line after /**/-comments.
While it might change the meaning of the comment in rare circumstances,
it is better than violating the column limit.
llvm-svn: 270975
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 2ddff47..e06b5de 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -1826,6 +1826,8 @@
return 500;
if (Left.isOneOf(tok::kw_class, tok::kw_struct))
return 5000;
+ if (Left.is(tok::comment))
+ return 1000;
if (Left.isOneOf(TT_RangeBasedForLoopColon, TT_InheritanceColon))
return 2;
@@ -2464,7 +2466,7 @@
Left.getPrecedence() == prec::Assignment))
return true;
return Left.isOneOf(tok::comma, tok::coloncolon, tok::semi, tok::l_brace,
- tok::kw_class, tok::kw_struct) ||
+ tok::kw_class, tok::kw_struct, tok::comment) ||
Right.isMemberAccess() ||
Right.isOneOf(TT_TrailingReturnArrow, TT_LambdaArrow, tok::lessless,
tok::colon, tok::l_square, tok::at) ||