[clang] [Clang] [NFC] Introduce a helper for emitting compatibility diagnostics (PR #132348)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 21 07:08:07 PDT 2025


================
@@ -1518,6 +1518,50 @@ static void verifyDiagnosticWording(const Record &Diag) {
   // runs into odd situations like [[clang::warn_unused_result]],
   // #pragma clang, or --unwindlib=libgcc.
 }
+
+/// ClangDiagsCompatIDsEmitter - Emit a set of 'compatibility diagnostic ids'
+/// that map to a set of 2 regular diagnostic ids each and which are used to
+/// simplify emitting compatibility warnings.
+void clang::EmitClangDiagsCompatIDs(const llvm::RecordKeeper &Records,
----------------
erichkeane wrote:

Are we anticipating doing this multiple times?  Why the `BEGIN` and `END`?  Is the idea that we'd have a different list for parse vs sema?  I'd prefer we get 1 list, then we don't need `BEGIN` and `END`, but I haven't thought through this enough.

https://github.com/llvm/llvm-project/pull/132348


More information about the cfe-commits mailing list