[clang] [clang][NFC][diagnostics] Remove several uses of `getCustomDiagID()` (PR #172532)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 22 15:11:28 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;
----------------
Sirraide wrote:
`E->getStmtClassName()` is not actually used by the diagnostic, so passing it to it doesn’t do anything; this was already an issue before here, so either remove it or actually include it in the diagnostic text for this variant (and please also double-check if any of the other places you refactored pass any diagnostic arguments that aren’t used by the diagnostic)
https://github.com/llvm/llvm-project/pull/172532
More information about the cfe-commits
mailing list