[clang] [Clang] [NFC] Introduce helpers for defining compatibilty warnings (PR #132129)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 20 05:21:02 PDT 2025
https://github.com/AaronBallman commented:
This is awesome, thank you for working on it! One question I have is whether we can also add a helper function for emitting these diagnostics. It's almost always an awkward dance of `getLangOpts().CPlusPlusYZ ? diag::ext_... : diag::warn_...` and it would be really nice if we could do something like `EmitCompatDiags(Loc, diag::decomp_decl_spec)` and the helper function handles translating that to the `getLangOpts()` dance with the correct diagnostic. Do you think something like that would be a plausible next step (along with doing the same for C diagnostics)?
https://github.com/llvm/llvm-project/pull/132129
More information about the cfe-commits
mailing list