================
@@ -4699,6 +4699,113 @@ TEST_F(FormatTestComments, SplitCommentIntroducers) {
getLLVMStyleWithColumns(10)));
}
+TEST_F(FormatTestComments, LineCommentsOnStartOfFunctionCall) {
+ auto Style = getLLVMStyle();
+
+ EXPECT_EQ(Style.Cpp11BracedListStyle, FormatStyle::CBLSS_ToBeNamed);
+
+ verifyFormat("T foo( // Comment\n"
+ " arg);",
+ Style);
+
+ verifyFormat("T bar{// Comment\n"
+ " arg};",
+ Style);
+
+ verifyFormat("T baz({// Comment\n"
+ " arg});",
+ Style);
+
+ verifyFormat("T baz{{// Comment\n"
+ " arg}};",
+ Style);
+
+ verifyFormat("T b0z(f( // Comment\n"
+ " arg));",
+ Style);
+
+ verifyFormat("T b0z(F{// Comment\n"
+ " arg});",
+ Style);
+
+ verifyFormat("func( // Comment\n"
+ " arg);",
+ Style);
+
+ verifyFormat("func({// Comment\n"
+ " arg});",
+ Style);
----------------
HazardyKnusperkeks wrote:
I've reduced it to the example from the documentation, I think it's nice to
have that at one place.
https://github.com/llvm/llvm-project/pull/71672
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits