Skip to content

Commit 14d50ca

Browse files
committed
Add docs
1 parent 32ec64f commit 14d50ca

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

lib/Index/Index.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -966,8 +966,18 @@ class IndexSwiftASTWalker : public SourceEntityWalker {
966966
bool startEntityDecl(ValueDecl *D);
967967

968968
bool reportRelatedRef(ValueDecl *D, SourceLoc Loc, bool isImplicit, SymbolRoleSet Relations, Decl *Related);
969+
970+
/// Report references for dependent types
971+
///
972+
/// NOTE: If the dependent type is a typealias, report the underlying types as well.
973+
///
974+
/// \param Ty The type being referenced.
975+
/// \param Relations The relationship between the referenced type and the passed Decl.
976+
/// \param Related The Decl that is referencing the type.
977+
/// \param isImplicit Whether the reference is implicit, such as for a typealias' underlying type.
978+
/// \param Loc The location of the reference, otherwise the location of the TypeLoc is used.
969979
bool reportRelatedTypeRef(const TypeLoc &Ty, SymbolRoleSet Relations, Decl *Related,
970-
bool isImplicit=false, const Optional<SourceLoc> Loc=Optional<SourceLoc>());
980+
bool isImplicit=false, Optional<SourceLoc> Loc=Optional<SourceLoc>());
971981
bool reportInheritedTypeRefs(
972982
ArrayRef<InheritedEntry> Inherited, Decl *Inheritee);
973983
NominalTypeDecl *getTypeLocAsNominalTypeDecl(const TypeLoc &Ty);
@@ -1384,7 +1394,7 @@ bool IndexSwiftASTWalker::reportInheritedTypeRefs(ArrayRef<InheritedEntry> Inher
13841394
}
13851395

13861396
bool IndexSwiftASTWalker::reportRelatedTypeRef(const TypeLoc &Ty, SymbolRoleSet Relations,
1387-
Decl *Related, bool Implicit, const Optional<SourceLoc> Loc) {
1397+
Decl *Related, bool Implicit, Optional<SourceLoc> Loc) {
13881398
if (auto *composite = llvm::dyn_cast_or_null<CompositionTypeRepr>(Ty.getTypeRepr())) {
13891399
SourceLoc IdLoc = Loc.value_or(composite->getSourceLoc());
13901400
for (auto *Type : composite->getTypes())

0 commit comments

Comments
 (0)