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

Dave Bartolomeo via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 23 06:25:36 PST 2025


================
@@ -5027,11 +5017,9 @@ void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity,
   case Expr::BinaryConditionalOperatorClass: {
     NotPrimaryExpr();
     DiagnosticsEngine &Diags = Context.getDiags();
-    unsigned DiagID =
-      Diags.getCustomDiagID(DiagnosticsEngine::Error,
-                "?: operator with omitted middle operand cannot be mangled");
-    Diags.Report(E->getExprLoc(), DiagID)
-      << E->getStmtClassName() << E->getSourceRange();
+    Diags.Report(E->getExprLoc(), err_unsupported_itanium_mangling)
+        << UnsupportedItaniumManglingKind::TernaryWithOmittedMiddleOperand
+        << E->getStmtClassName() << E->getSourceRange();
     return;
----------------
dbartol wrote:

I've removed it, since it should always be the same statement class, and we already describe the operator in the message. I looked through the other changed diags, and this is the only one with extra arguments.


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


More information about the cfe-commits mailing list