================ @@ -257,7 +257,10 @@ static bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, // preprocessor keywords and it wasn't macro expanded, it turns // into a simple 0 if (ValueLive) { - PP.Diag(PeekTok, diag::warn_pp_undef_identifier) << II; + if (II->getName() == "true") + PP.Diag(PeekTok, diag::warn_pp_undef_true_identifier); + else + PP.Diag(PeekTok, diag::warn_pp_undef_identifier) << II; const DiagnosticsEngine &DiagEngine = PP.getDiagnostics(); // If 'Wundef' is enabled, do not emit 'undef-prefix' diagnostics. ---------------- zygoloid wrote:
We should check the same DiagID we used above in the `isIgnored` check too; the logic is meant to be "if we just issued a diagnostic then don't produce another". https://github.com/llvm/llvm-project/pull/128265 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits