mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 19:50:14 +01:00
Avoid using clang::UnresolvedSetImpl (#6197)
Avoid relying on implementation details. Also, use `DeclAccessPair::operator->` instead of `.getDecl()->`.
This commit is contained in:
@@ -35,7 +35,7 @@ static auto GetCppName(Context& context, SemIR::NameId name_id)
|
||||
// Adds the given overload candidates to the candidate set.
|
||||
static auto AddOverloadCandidates(clang::Sema& sema,
|
||||
clang::OverloadCandidateSet& candidate_set,
|
||||
const clang::UnresolvedSetImpl& functions,
|
||||
const clang::UnresolvedSet<4>& functions,
|
||||
clang::Expr* self_arg,
|
||||
llvm::ArrayRef<clang::Expr*> args) -> void {
|
||||
constexpr bool SuppressUserConversions = false;
|
||||
@@ -43,7 +43,7 @@ static auto AddOverloadCandidates(clang::Sema& sema,
|
||||
constexpr clang::TemplateArgumentListInfo* ExplicitTemplateArgs = nullptr;
|
||||
|
||||
for (auto found_decl : functions.pairs()) {
|
||||
auto* decl = found_decl.getDecl()->getUnderlyingDecl();
|
||||
auto* decl = found_decl->getUnderlyingDecl();
|
||||
auto* template_decl = dyn_cast<clang::FunctionTemplateDecl>(decl);
|
||||
auto* fn_decl = template_decl ? template_decl->getTemplatedDecl()
|
||||
: cast<clang::FunctionDecl>(decl);
|
||||
|
||||
Reference in New Issue
Block a user