[clang] [Clang] Avoid unnecessary overload resolution when building RecoveryExpr (PR #222296)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 9 06:20:47 PDT 2026


================
@@ -14790,9 +14808,10 @@ BuildRecoveryCallExpr(Sema &SemaRef, Scope *S, Expr *Fn,
   CXXRecordDecl *FoundInClass = nullptr;
   if (DiagnoseTwoPhaseLookup(SemaRef, Fn->getExprLoc(), SS, R,
                              OverloadCandidateSet::CSK_Normal,
-                             ExplicitTemplateArgs, Args, &FoundInClass)) {
+                             KnownInvalidCandidateSet, ExplicitTemplateArgs,
+                             Args, &FoundInClass)) {
     // OK, diagnosed a two-phase lookup issue.
-  } else if (EmptyLookup) {
+  } else if (KnownInvalidCandidateSet.empty()) {
----------------
zyn0217 wrote:

Yes they are, in FinishOverloadedCallExpr it was CandidateSet->empty(), and KnownInvalidCandidateSet is a reference to CandidateSet now

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


More information about the cfe-commits mailing list