mizvekov added inline comments.
================ Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:1643 - return Param == Arg? Sema::TDK_Success : Sema::TDK_NonDeducedMismatch; + return ParDesug == ArgDesug ? Sema::TDK_Success + : Sema::TDK_NonDeducedMismatch; ---------------- rsmith wrote: > This looks wrong to me: we should be comparing the types, not how they're > written. `Context.hasSameType(Param, Arg)` (or > `Context.hasSameUnqualifiedType(Param, Arg)` in the `TDF_IgnoreQualifiers` > case) would be appropriate here. You are right, but the reason we don't get into any troubles here is because this is dead code anyway, the non-dependent case will always be handled above :) Although perhaps, I wonder if we should dig down into non-dependent types anyway, in case the types are too complex and it's not immediately obvious what does not match, we could perhaps improve the diagnostic? I will experiment a little bit with this idea. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110216/new/ https://reviews.llvm.org/D110216 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits