[clang] [clang][Sema] Fix particular operator overload crash (PR #105976)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 26 12:12:29 PDT 2024
================
@@ -7425,6 +7425,13 @@ void Sema::AddMethodCandidate(DeclAccessPair FoundDecl, QualType ObjectType,
/*ExplicitArgs*/ nullptr, ObjectType,
ObjectClassification, Args, CandidateSet,
SuppressUserConversions, false, PO);
+ } else if (UsingDecl *UD = dyn_cast<UsingDecl>(Decl)) {
+ for (auto *Shadow : UD->shadows()) {
+ AddMethodCandidate(cast<CXXMethodDecl>(Shadow->getTargetDecl()),
+ FoundDecl, ActingContext, ObjectType,
+ ObjectClassification, Args, CandidateSet,
+ SuppressUserConversions, false, std::nullopt, PO);
----------------
mizvekov wrote:
I think this needs better investigation why that commit introduced this change.
One concerns is that the target decl could be a FunctionTemplate as well.
https://github.com/llvm/llvm-project/pull/105976
More information about the cfe-commits
mailing list