Due to a bug in the patch, clang-format would more or less simply format
all multi-line comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196080
91177308-0d34-0410-b5e6-
96231b3b80d8
bool IsContinuedComment = Line->First->is(tok::comment) &&
Line->First->Next == NULL &&
Line->First->NewlinesBefore < 2 && PreviousLine &&
+ PreviousLine->Affected &&
PreviousLine->Last->is(tok::comment);
if (SomeTokenAffected || SomeFirstChildAffected || LineMoved ||
"\n"
" // This is unrelated",
0, 0, getLLVMStyle()));
+ EXPECT_EQ("int a;\n"
+ "// This is\n"
+ "// not formatted. ",
+ format("int a;\n"
+ "// This is\n"
+ "// not formatted. ",
+ 0, 0, getLLVMStyle()));
}
TEST_F(FormatTest, RemovesTrailingWhitespaceOfComments) {