[clang] [Clang] Fix an assertion in the resolution of perfect matches (PR #140073)

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Thu May 15 08:58:39 PDT 2025


================
@@ -430,8 +430,14 @@ class Sema;
       if (!ReferenceBinding) {
 #ifndef NDEBUG
         auto Decay = [&](QualType T) {
-          return (T->isArrayType() || T->isFunctionType()) ? C.getDecayedType(T)
-                                                           : T;
+          T = (T->isArrayType() || T->isFunctionType()) ? C.getDecayedType(T)
----------------
alexfh wrote:

Since it's not a single expression any more, a simple `if` would be a bit nicer here, IMO.

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


More information about the cfe-commits mailing list