State.NextToken->WhitespaceRange.getEnd()) -
SourceMgr.getSpellingColumnNumber(
State.NextToken->WhitespaceRange.getBegin());
- State.Column += WhitespaceLength + State.NextToken->ColumnWidth;
- State.NextToken = State.NextToken->Next;
+ State.Column += WhitespaceLength;
+ moveStateToNextToken(State, DryRun, /*NewLine=*/false);
return 0;
}
Penalty += State.NextToken->SplitPenalty;
-
// Breaking before the first "<<" is generally not desirable if the LHS is
// short. Also always add the penalty if the LHS is split over mutliple lines
// to avoid unncessary line breaks that just work around this penalty.
verifyFormat("#define A ''qqq");
verifyFormat("#define A `qqq");
verifyFormat("f(\"aaaa, bbbb, \"\\\"ccccc\\\"\");");
+ EXPECT_EQ("const char *c = STRINGIFY(\n"
+ "\\na : b);",
+ format("const char * c = STRINGIFY(\n"
+ "\\na : b);"));
}
TEST_F(FormatTest, IndentsPPDirectiveInReducedSpace) {