Before: void f(int */* unused */) {}
After: void f(int * /* unused */) {}
The previous version seems to be valid C++ code but confuses many syntax
highlighters.
llvm-svn: 185320
(Left.Type != TT_PointerOrReference || Style.PointerBindsToType))
return true;
if (Left.Type == TT_PointerOrReference)
- return Right.Tok.isLiteral() ||
+ return Right.Tok.isLiteral() || Right.Type == TT_BlockComment ||
((Right.Type != TT_PointerOrReference) &&
Right.isNot(tok::l_paren) && Style.PointerBindsToType &&
Left.Previous &&
format("int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; /* comment */\n"
"int bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; /* comment */\n"
"int cccccccccccccccccccccccccccccc; /* comment */\n"));
+
+ verifyFormat("void f(int * /* unused */) {}");
}
TEST_F(FormatTest, BlockCommentsInMacros) {