Skip to content

Commit 3e6d629

Browse files
committed
Revert "[clang-format][NFC] Remove a redundant isLiteral() call"
This reverts commit f603369. This change is labeled as NFC, but introduces a functional change without a test, and caused a breakage as reported in https://reviews.llvm.org/rGf6033699646b7650123a273c043a93e5eeaac6d8.
1 parent 48ff354 commit 3e6d629

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clang/lib/Format/TokenAnnotator.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3409,8 +3409,10 @@ static bool isFunctionDeclarationName(bool IsCpp, const FormatToken &Current,
34093409
Tok->isOneOf(TT_PointerOrReference, TT_StartOfName, tok::ellipsis)) {
34103410
return true;
34113411
}
3412-
if (Tok->isOneOf(tok::l_brace, TT_ObjCMethodExpr) || Tok->Tok.isLiteral())
3412+
if (Tok->isOneOf(tok::l_brace, tok::string_literal, TT_ObjCMethodExpr) ||
3413+
Tok->Tok.isLiteral()) {
34133414
return false;
3415+
}
34143416
}
34153417
return false;
34163418
}

0 commit comments

Comments
 (0)