[clang] [clang][diagnostics] add '-Wundef-true' warning option (PR #128265)
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 1 11:35:25 PST 2025
================
@@ -393,6 +393,9 @@ def pp_macro_not_used : Warning<"macro is not used">, DefaultIgnore,
def warn_pp_undef_identifier : Warning<
"%0 is not defined, evaluates to 0">,
InGroup<DiagGroup<"undef">>, DefaultIgnore;
+def warn_pp_undef_true_identifier : Warning<
+ "'true' is not defined, evaluates to 0">,
+ InGroup<DiagGroup<"undef-true">>;
----------------
zygoloid wrote:
`-Wundef-true` should be a child warning group under `-Wundef`, so that `-Wundef` and `-Wno-undef` continue to cover both cases. You'll need to define the groups in DiagnosticGroups.td
https://github.com/llvm/llvm-project/pull/128265
More information about the cfe-commits
mailing list