[clang] [clang][NFC][diagnostics] Remove several uses of `getCustomDiagID()` (PR #172532)

via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 23 06:43:05 PST 2025


================
@@ -3315,10 +3315,8 @@ void VFTableBuilder::dumpLayout(raw_ostream &Out) {
 
     default:
       DiagnosticsEngine &Diags = Context.getDiagnostics();
-      unsigned DiagID = Diags.getCustomDiagID(
-          DiagnosticsEngine::Error,
-          "Unexpected vftable component type %0 for component number %1");
-      Diags.Report(MostDerivedClass->getLocation(), DiagID)
+      Diags.Report(MostDerivedClass->getLocation(),
+                   diag::err_unexpected_vftable_component)
           << I << Component.getKind();
----------------
Sirraide wrote:

I know this was like this before, but are these swapped? I’d imagine the ‘component type’ should be `Component.getKind()` and the ‘component number’ should be `I`.

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


More information about the cfe-commits mailing list