Skip to content

Commit 7a732ef

Browse files
committed
Add doc comments to the new lookupVisible* functions
1 parent 4ce4e6d commit 7a732ef

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/Sema/LookupVisibleDecls.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,11 @@ static void lookupVisibleDynamicMemberLookupDecls(
923923
LazyResolver *typeResolver, GenericSignatureBuilder *GSB,
924924
VisitedSet &visited, llvm::DenseSet<TypeBase *> &seenDynamicLookup);
925925

926+
/// Enumerates all members of \c baseType, including both directly visible and
927+
/// members visible by keypath dynamic member lookup.
928+
///
929+
/// \note This is an implementation detail of \c lookupVisibleMemberDecls and
930+
/// exists to create the correct recursion for dynamic member lookup.
926931
static void lookupVisibleMemberAndDynamicMemberDecls(
927932
Type baseType, VisibleDeclConsumer &consumer,
928933
KeyPathDynamicMemberConsumer &dynamicMemberConsumer, const DeclContext *DC,
@@ -936,6 +941,12 @@ static void lookupVisibleMemberAndDynamicMemberDecls(
936941
seenDynamicLookup);
937942
}
938943

944+
/// Enumerates all keypath dynamic members of \c baseType, as seen from the
945+
/// context \c dc.
946+
///
947+
/// If \c baseType is \c @dynamicMemberLookup, this looks up any keypath
948+
/// dynamic member subscripts and looks up the members of the keypath's root
949+
/// type.
939950
static void lookupVisibleDynamicMemberLookupDecls(
940951
Type baseType, KeyPathDynamicMemberConsumer &consumer,
941952
const DeclContext *dc, LookupState LS, DeclVisibilityKind reason,

0 commit comments

Comments
 (0)