diff options
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 2 | ||||
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index c5315e72600..681903b4124 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -1110,6 +1110,8 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, return false; if (Left.is(tok::period) || Right.is(tok::period)) return false; + if (Left.Type == TT_BlockComment && Left.TokenText.endswith("=*/")) + return false; return true; } diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 6b1d2d3f400..909932e7c4b 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -756,7 +756,7 @@ TEST_F(FormatTest, RemovesTrailingWhitespaceOfComments) { } TEST_F(FormatTest, UnderstandsBlockComments) { - verifyFormat("f(/*test=*/ true);"); + verifyFormat("f(/*noSpaceAfterParameterNamingComment=*/true);"); EXPECT_EQ( "f(aaaaaaaaaaaaaaaaaaaaaaaaa, /* Trailing comment for aa... */\n" " bbbbbbbbbbbbbbbbbbbbbbbbb);", |

