[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 15 07:41:46 PDT 2025
================
@@ -979,6 +1002,22 @@ class Sema;
return false;
}
+ // An overload is a perfect match if the conversion
+ // sequences for each argument are perfect.
+ bool isPerfectMatch(const ASTContext &Ctx) const {
+ if (!Viable)
+ return false;
+ for (const auto &C : Conversions) {
+ if (!C.isInitialized())
+ return false;
+ if (!C.isPerfect(Ctx))
----------------
erichkeane wrote:
As a nit, putting these two in separate 'if' statements doesn't really improve readability for me, so `if (!C.isInitialized() || !C.isPerfect(Ctx)) return false; ` probably is just as good.
https://github.com/llvm/llvm-project/pull/133426
More information about the cfe-commits
mailing list