[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 31 22:58:09 PDT 2025
================
@@ -14354,6 +14584,17 @@ ExprResult Sema::BuildOverloadedCallExpr(Scope *S, Expr *Fn,
OverloadingResult OverloadResult =
CandidateSet.BestViableFunction(*this, Fn->getBeginLoc(), Best);
+ // [C++23][over.call.func]
+ // if overload resolution selects a non-static member function,
+ // the call is ill-formed;
+ if (CSK == OverloadCandidateSet::CSK_AddressOfOverloadSet &&
+ Best != CandidateSet.end()) {
----------------
zyn0217 wrote:
nevermind I realized it is https://github.com/llvm/llvm-project/pull/133426#discussion_r2018513280 :P
https://github.com/llvm/llvm-project/pull/133426
More information about the cfe-commits
mailing list