[clang-tools-extra] [clang-tidy] Fix false positive in misc-redundant-expression with type aliases (PR #198085)
Peiqi Li via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 2 05:28:57 PDT 2026
================
@@ -44,6 +45,328 @@ static bool incrementWithoutOverflow(const APSInt &Value, APSInt &Result) {
return Value < Result;
}
+static bool areEquivalentExpr(const Expr *Left, const Expr *Right);
----------------
voyager-jhk wrote:
> Not, unfortunately. Enabling uniquing for non-dependent template specialization types, which would make your example work, adds about a `0.7%` performance penalty when measured bootstrapping clang.
>
> My plan is to have all this working long term, but there are other improvements that need to be made so that it doesn't introduce performance regressions.
>
> For that reason, the `aka` logic for the type printer in diagnostics does a comparison of the stringfied type. That may work here and be much simpler.
Thanks for the context! I'll try it.
https://github.com/llvm/llvm-project/pull/198085
More information about the cfe-commits
mailing list