diff options
author | Daniel Jasper <djasper@google.com> | 2013-02-04 07:32:14 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-02-04 07:32:14 +0000 |
commit | 1f140981b6af0c8cf0455a9999707a837de071ad (patch) | |
tree | e35914e3eb2c2e14d7ee469bfa6bffacc8fa415f /clang/lib/Format/Format.cpp | |
parent | f7f13c0ef288841f3695f825302e39dc0fb6f088 (diff) | |
download | bcm5719-llvm-1f140981b6af0c8cf0455a9999707a837de071ad.tar.gz bcm5719-llvm-1f140981b6af0c8cf0455a9999707a837de071ad.zip |
Improve handling of trailing block comments.
We can now (even in non-bin-packing modes) format:
someFunction(1, /* comment 1 */
2, /* comment 2 */
3, /* comment 3 */
aaa);
llvm-svn: 174309
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 3 |
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 && |