[clang] Added macro name to redifine and undef macro as a part of the issue#88882 (PR #167299)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 10 08:34:13 PST 2025
================
@@ -3289,7 +3289,7 @@ void Preprocessor::HandleDefineDirective(
// Warn if defining "__LINE__" and other builtins, per C99 6.10.8/4 and
// C++ [cpp.predefined]p4, but allow it as an extension.
if (isLanguageDefinedBuiltin(SourceMgr, OtherMI, II->getName()))
- Diag(MacroNameTok, diag::ext_pp_redef_builtin_macro);
+ Diag(MacroNameTok, diag::ext_pp_redef_builtin_macro) << MacroNameTok.getIdentifierInfo(); // inserting this diagonstic message into stream.
----------------
zwuis wrote:
Unnecessary comment. Ditto below.
https://github.com/llvm/llvm-project/pull/167299
More information about the cfe-commits
mailing list