Skip to content

Commit 2269b42

Browse files
committed
[ClangImporter] Correct check to ignore macro
The functionality of this function changed upstream in llvm/llvm-project#97274 and it now returns the value of the character, rather than the character itself.
1 parent 245fd5b commit 2269b42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ClangImporter/ImportName.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2378,7 +2378,7 @@ static bool shouldIgnoreMacro(StringRef name, const clang::MacroInfo *macro,
23782378
if (macro->isUsedForHeaderGuard() && macro->getNumTokens() == 1) {
23792379
auto tok = macro->tokens()[0];
23802380
if (tok.is(clang::tok::numeric_constant) && tok.getLength() == 1 &&
2381-
PP.getSpellingOfSingleCharacterNumericConstant(tok) == '1')
2381+
PP.getSpellingOfSingleCharacterNumericConstant(tok) == 1)
23822382
return true;
23832383
}
23842384

0 commit comments

Comments
 (0)