File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -396,7 +396,7 @@ def pp_out_of_date_dependency : Warning<
396396 "current file is older than dependency %0">;
397397def ext_pp_undef_builtin_macro : ExtWarn<"undefining builtin macro">,
398398 InGroup<BuiltinMacroRedefined>;
399- def ext_pp_redef_builtin_macro : ExtWarn<"redefining builtin macro">,
399+ def ext_pp_redef_builtin_macro : ExtWarn<"redefining builtin macro '%0' ">,
400400 InGroup<BuiltinMacroRedefined>;
401401def pp_disabled_macro_expansion : Warning<
402402 "disabled expansion of recursive macro">, DefaultIgnore,
Original file line number Diff line number Diff line change @@ -3289,7 +3289,7 @@ void Preprocessor::HandleDefineDirective(
32893289 // Warn if defining "__LINE__" and other builtins, per C99 6.10.8/4 and
32903290 // C++ [cpp.predefined]p4, but allow it as an extension.
32913291 if (isLanguageDefinedBuiltin (SourceMgr, OtherMI, II->getName ()))
3292- Diag (MacroNameTok, diag::ext_pp_redef_builtin_macro);
3292+ Diag (MacroNameTok, diag::ext_pp_redef_builtin_macro) << MacroNameTok. getIdentifierInfo (); // inserting this diagonstic message into stream.
32933293 // Macros must be identical. This means all tokens and whitespace
32943294 // separation must be the same. C99 6.10.3p2.
32953295 else if (!OtherMI->isAllowRedefinitionsWithoutWarning () &&
@@ -3354,7 +3354,7 @@ void Preprocessor::HandleUndefDirective() {
33543354 // Warn if undefining "__LINE__" and other builtins, per C99 6.10.8/4 and
33553355 // C++ [cpp.predefined]p4, but allow it as an extension.
33563356 if (isLanguageDefinedBuiltin (SourceMgr, MI, II->getName ()))
3357- Diag (MacroNameTok, diag::ext_pp_undef_builtin_macro);
3357+ Diag (MacroNameTok, diag::ext_pp_undef_builtin_macro) << MacroNameTok. getIdentifierInfo (); // inserting this diagnostic message into it
33583358
33593359 if (MI->isWarnIfUnused ())
33603360 WarnUnusedMacroLocs.erase (MI->getDefinitionLoc ());
You can’t perform that action at this time.
0 commit comments