Tokens.back()->Tok.getIdentifierInfo()->getPPKeywordID() ==
tok::pp_define) &&
it != Macros.end()) {
- if (it->second == TT_UntouchableMacroFunc)
- FormatTok->setFinalizedType(TT_UntouchableMacroFunc);
- else
- FormatTok->setType(it->second);
+ FormatTok->setType(it->second);
if (it->second == TT_IfMacro) {
// The lexer token currently has type tok::kw_unknown. However, for this
// substitution to be treated correctly in the TokenAnnotator, faking
: CommentsBeforeNextToken.front()->NewlinesBefore > 0;
if (FollowedByNewline && (Text.size() >= 5 || FunctionLike) &&
- tokenCanStartNewLine(*FormatTok) && Text == Text.upper() &&
- !PreviousToken->isTypeFinalized()) {
+ tokenCanStartNewLine(*FormatTok) && Text == Text.upper()) {
PreviousToken->setFinalizedType(TT_FunctionLikeOrFreestandingMacro);
addUnwrappedLine();
return;
// Don't use the helpers here, since 'mess up' will change the whitespace
// and these are all whitespace sensitive by definition
-
- // Newlines are important here.
- EXPECT_EQ("FOO(1+2 );\n", format("FOO(1+2 );\n", Style));
- EXPECT_EQ("FOO(1+2 )\n", format("FOO(1+2 )\n", Style));
-
EXPECT_EQ("FOO(String-ized&Messy+But(: :Still)=Intentional);",
format("FOO(String-ized&Messy+But(: :Still)=Intentional);", Style));
EXPECT_EQ(