Skip to content

Commit d445a18

Browse files
authored
[Index] Remove unused function (NFC) (#65334)
1 parent 520997e commit d445a18

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

lib/Index/Index.cpp

-12
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,6 @@ class IndexSwiftASTWalker : public SourceEntityWalker {
965965
bool reportRelatedTypeRef(const TypeLoc &Ty, SymbolRoleSet Relations, Decl *Related);
966966
bool reportInheritedTypeRefs(
967967
ArrayRef<InheritedEntry> Inherited, Decl *Inheritee);
968-
NominalTypeDecl *getTypeLocAsNominalTypeDecl(const TypeLoc &Ty);
969968

970969
bool reportPseudoGetterDecl(VarDecl *D) {
971970
return reportPseudoAccessor(D, AccessorKind::Get, /*IsRef=*/false,
@@ -1474,17 +1473,6 @@ bool IndexSwiftASTWalker::reportPseudoAccessor(AbstractStorageDecl *D,
14741473
return !Cancelled;
14751474
}
14761475

1477-
NominalTypeDecl *
1478-
IndexSwiftASTWalker::getTypeLocAsNominalTypeDecl(const TypeLoc &Ty) {
1479-
if (Type T = Ty.getType())
1480-
return T->getAnyNominal();
1481-
if (auto *declRefTR = dyn_cast_or_null<DeclRefTypeRepr>(Ty.getTypeRepr())) {
1482-
if (auto NTD = dyn_cast_or_null<NominalTypeDecl>(declRefTR->getBoundDecl()))
1483-
return NTD;
1484-
}
1485-
return nullptr;
1486-
}
1487-
14881476
bool IndexSwiftASTWalker::reportExtension(ExtensionDecl *D) {
14891477
SourceLoc Loc = getLocForExtension(D);
14901478
NominalTypeDecl *NTD = D->getExtendedNominal();

0 commit comments

Comments
 (0)