[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 11 08:21:56 PDT 2024


================
@@ -509,30 +499,32 @@ DiagnosticIDs::getDiagnosticLevel(unsigned DiagID, SourceLocation Loc,
 diag::Severity
 DiagnosticIDs::getDiagnosticSeverity(unsigned DiagID, SourceLocation Loc,
                                      const DiagnosticsEngine &Diag) const {
-  assert(getBuiltinDiagClass(DiagID) != CLASS_NOTE);
+  const bool IsCustomDiag = DiagnosticIDs::IsCustomDiag(DiagID);
----------------
AaronBallman wrote:

We don't typically use top-level const on locals (here and elsewhere in the patch).

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


More information about the cfe-commits mailing list