[clang] [clang][Lex][NFC] Reorder SrcMgr checks in CheckMacroName (PR #141483)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Tue May 27 11:25:12 PDT 2025
================
@@ -373,8 +373,8 @@ bool Preprocessor::CheckMacroName(Token &MacroNameTok, MacroUse isDefineUndef,
// Macro names with reserved identifiers are accepted if built-in or passed
// through the command line (the later may be present if -dD was used to
// generate the preprocessed file).
- if (!SourceMgr.isInPredefinedFile(MacroNameLoc) &&
- !SourceMgr.isInSystemHeader(MacroNameLoc)) {
+ if (!SourceMgr.isInSystemHeader(MacroNameLoc) &&
----------------
shafik wrote:
Seems like change deserves a note since it is not obvious the order matters or why.
https://github.com/llvm/llvm-project/pull/141483
More information about the cfe-commits
mailing list