Skip to content

Commit 9441c27

Browse files
authored
Avoid using clang::UnresolvedSetImpl (#6197)
Avoid relying on implementation details. Also, use `DeclAccessPair::operator->` instead of `.getDecl()->`.
1 parent 96a3c1e commit 9441c27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

toolchain/check/cpp/overload_resolution.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ static auto GetCppName(Context& context, SemIR::NameId name_id)
3535
// Adds the given overload candidates to the candidate set.
3636
static auto AddOverloadCandidates(clang::Sema& sema,
3737
clang::OverloadCandidateSet& candidate_set,
38-
const clang::UnresolvedSetImpl& functions,
38+
const clang::UnresolvedSet<4>& functions,
3939
clang::Expr* self_arg,
4040
llvm::ArrayRef<clang::Expr*> args) -> void {
4141
constexpr bool SuppressUserConversions = false;
4242
constexpr bool PartialOverloading = false;
4343
constexpr clang::TemplateArgumentListInfo* ExplicitTemplateArgs = nullptr;
4444

4545
for (auto found_decl : functions.pairs()) {
46-
auto* decl = found_decl.getDecl()->getUnderlyingDecl();
46+
auto* decl = found_decl->getUnderlyingDecl();
4747
auto* template_decl = dyn_cast<clang::FunctionTemplateDecl>(decl);
4848
auto* fn_decl = template_decl ? template_decl->getTemplatedDecl()
4949
: cast<clang::FunctionDecl>(decl);

0 commit comments

Comments
 (0)