================
@@ -14634,8 +14647,13 @@ static bool DiagnoseTwoPhaseLookup(
R.suppressDiagnostics();
OverloadCandidateSet Candidates(FnLoc, CSK);
- SemaRef.AddOverloadedCallCandidates(R, ExplicitTemplateArgs, Args,
- Candidates);
+ for (LookupResult::iterator I = R.begin(), E = R.end(); I != E; ++I) {
+ if (InvalidCandidates.contains(I->getAsFunction()))
----------------
zyn0217 wrote:
This is basically Sema::AddOverloadedCallCandidates with a filter.
I'm not sure I follow what you want, but R and Candidates are separate vectors
(R comes from a unique name lookup at line 14644 (github hides that!), and
Candidates are built earlier and they contain validity info we need.)
and a set avoids quadratic lookup
The idea is to drop those candidates that we had confirmed invalid. See its
caller FinishOverloadedCallExpr
https://github.com/llvm/llvm-project/pull/222296
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits