Before:
#define A \
int i; /*a*/ \
int jjj; /*b*/
After:
#define A \
int i; /*a*/ \
int jjj; /*b*/
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205011
91177308-0d34-0410-b5e6-
96231b3b80d8
if (Changes[i].IsTrailingComment) {
assert(Column >= Changes[i].StartOfTokenColumn);
Changes[i].Spaces += Column - Changes[i].StartOfTokenColumn;
+ if (i + 1 != End) {
+ Changes[i + 1].PreviousEndOfTokenColumn +=
+ Column - Changes[i].StartOfTokenColumn;
+ }
Changes[i].StartOfTokenColumn = Column;
}
}
" /* parameter 3 */ aaaaaa,\n"
" /* parameter 4 */ aaaaaa);",
NoBinPacking);
+
+ // Aligning block comments in macros.
+ verifyGoogleFormat("#define A \\\n"
+ " int i; /*a*/ \\\n"
+ " int jjj; /*b*/");
}
TEST_F(FormatTest, AlignsBlockComments) {