[clang] [Clang] Avoid unnecessary overload resolution when building RecoveryExpr (PR #222296)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 9 06:09: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()) {
----------------
erichkeane wrote:
IS this really the same thing? We switch this from zero candidates to zero VALID candidates? Why doesn't this lose diagnostics?
https://github.com/llvm/llvm-project/pull/222296
More information about the cfe-commits
mailing list