[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 17 08:48:47 PDT 2024


================
@@ -575,25 +575,42 @@ DiagnosticIDs::getDiagnosticSeverity(unsigned DiagID, SourceLocation Loc,
       DiagID != diag::fatal_too_many_errors && Diag.FatalsAsError)
     Result = diag::Severity::Error;
 
+  // Rest of the mappings are only applicable for diagnostics associated with a
+  // SourceLocation, bail out early for others.
+  if (!Diag.hasSourceManager())
----------------
ilya-biryukov wrote:

NIT: maybe split into a separate review and land right away?

This looks pretty orthogonal to the rest of the patch, so it'd make for a better commit history.

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


More information about the cfe-commits mailing list