@@ -3880,11 +3880,11 @@ TEST_F(FormatTestComments, IndentsLongJavadocAnnotatedLines) {
38803880
38813881TEST_F (FormatTestComments, SpaceAtLineCommentBegin) {
38823882 FormatStyle Style = getLLVMStyle ();
3883- constexpr StringRef NoTextInComment = " // \n "
3884- " \n "
3885- " void foo() {// \n "
3886- " // \n "
3887- " }" ;
3883+ constexpr StringRef NoTextInComment ( " // \n "
3884+ " \n "
3885+ " void foo() {// \n "
3886+ " // \n "
3887+ " }" ) ;
38883888
38893889 verifyFormat (" //\n "
38903890 " \n "
@@ -3912,7 +3912,7 @@ TEST_F(FormatTestComments, SpaceAtLineCommentBegin) {
39123912 NoTextInComment, Style);
39133913
39143914 Style = getLLVMStyle ();
3915- constexpr StringRef Code =
3915+ constexpr StringRef Code (
39163916 " //Free comment without space\n "
39173917 " \n "
39183918 " // Free comment with 3 spaces\n "
@@ -3982,9 +3982,9 @@ TEST_F(FormatTestComments, SpaceAtLineCommentBegin) {
39823982 " //} will not move\n "
39833983 " \n "
39843984 " //vv will only move\n "
3985- " //} if the line above does" ;
3985+ " //} if the line above does" ) ;
39863986
3987- constexpr StringRef Code2 =
3987+ constexpr StringRef Code2 (
39883988 " // Free comment without space\n "
39893989 " \n "
39903990 " // Free comment with 3 spaces\n "
@@ -4054,9 +4054,9 @@ TEST_F(FormatTestComments, SpaceAtLineCommentBegin) {
40544054 " //} will not move\n "
40554055 " \n "
40564056 " // vv will only move\n "
4057- " // } if the line above does" ;
4057+ " // } if the line above does" ) ;
40584058
4059- constexpr StringRef Code3 =
4059+ constexpr StringRef Code3 (
40604060 " //Free comment without space\n "
40614061 " \n "
40624062 " //Free comment with 3 spaces\n "
@@ -4126,9 +4126,9 @@ TEST_F(FormatTestComments, SpaceAtLineCommentBegin) {
41264126 " //} will not move\n "
41274127 " \n "
41284128 " //vv will only move\n "
4129- " //} if the line above does" ;
4129+ " //} if the line above does" ) ;
41304130
4131- constexpr StringRef Code4 =
4131+ constexpr StringRef Code4 (
41324132 " // Free comment without space\n "
41334133 " \n "
41344134 " // Free comment with 3 spaces\n "
@@ -4198,7 +4198,7 @@ TEST_F(FormatTestComments, SpaceAtLineCommentBegin) {
41984198 " //} will not move\n "
41994199 " \n "
42004200 " // vv will only move\n "
4201- " // } if the line above does" ;
4201+ " // } if the line above does" ) ;
42024202
42034203 verifyFormat (Code2, Code, Style);
42044204
@@ -4479,14 +4479,14 @@ TEST_F(FormatTestComments, SpaceAtLineCommentBegin) {
44794479}
44804480
44814481TEST_F (FormatTestComments, SplitCommentIntroducers) {
4482- verifyFormat (R"( //
4483- /\
4484- /
4485- ) " ,
4486- R"( //
4487- /\
4488- /
4489- ) " ,
4482+ verifyFormat (" // \n "
4483+ " / \\\n "
4484+ " / \n "
4485+ " " ,
4486+ " // \n "
4487+ " / \\\n "
4488+ " / \n "
4489+ " " ,
44904490 getLLVMStyleWithColumns (10 ));
44914491}
44924492
0 commit comments