@@ -51,10 +51,22 @@ class ModuleNameLookup {
5151 resolutionKind (resolutionKind),
5252 respectAccessControl(!ctx.isAccessControlDisabled()) {}
5353
54- // / Performs a qualified lookup into the given module and, if necessary, its
55- // / reexports.
54+ // / Performs the qualified lookup requested by \p LookupStrategy into the
55+ // / given module and, if necessary, its reexports.
5656 // /
57- // / The results are appended to \p decls.
57+ // / If 'moduleOrFile' is a ModuleDecl, we search the module and its
58+ // / public imports. If 'moduleOrFile' is a SourceFile, we search the
59+ // / file's parent module, the module's public imports, and the source
60+ // / file's private imports.
61+ // /
62+ // / \param[out] decls Results are appended to this vector.
63+ // / \param moduleOrFile The module or file unit to search, including imports.
64+ // / \param accessPath The access path that was imported; if not empty, only
65+ // / the named declaration will be imported.
66+ // / \param moduleScopeContext The top-level context from which the lookup is
67+ // / being performed, for checking access. This must be either a
68+ // / FileUnit or a Module.
69+ // / \param options Lookup options to apply.
5870 void lookupInModule (SmallVectorImpl<ValueDecl *> &decls,
5971 const DeclContext *moduleOrFile,
6072 ImportPath::Access accessPath,
@@ -77,6 +89,10 @@ class LookupByName : public ModuleNameLookup<LookupByName> {
7789 const NLKind lookupKind;
7890
7991public:
92+ // / \param ctx The AST context that the lookup will be performed in.
93+ // / \param name The name that will be looked up.
94+ // / \param lookupKind Whether this lookup is qualified or unqualified.
95+ // / \param resolutionKind What sort of decl is expected.
8096 LookupByName (ASTContext &ctx, ResolutionKind resolutionKind,
8197 DeclName name, NLKind lookupKind)
8298 : Super(ctx, resolutionKind), name(name),
@@ -89,6 +105,10 @@ class LookupByName : public ModuleNameLookup<LookupByName> {
89105 return true ;
90106 }
91107
108+ // / \param module The module to search for declarations in.
109+ // / \param path The access path that was imported; if not empty, only the
110+ // / named declaration will be imported.
111+ // / \param[out] localDecls Results are appended to this vector.
92112 void doLocalLookup (ModuleDecl *module , ImportPath::Access path,
93113 OptionSet<ModuleLookupFlags> flags,
94114 SmallVectorImpl<ValueDecl *> &localDecls) {
0 commit comments