Skip to content

[AST] Refactor name lookup a bit #18317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions include/swift/AST/DeclContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,32 @@ class alignas(1 << DeclContextAlignInBits) DeclContext {
LazyResolver *typeResolver,
SmallVectorImpl<ValueDecl *> &decls) const;

/// Look for the set of declarations with the given name within the
/// given set of type declarations.
///
/// \param types The type declarations to look into.
///
/// \param member The member to search for.
///
/// \param options Options that control name lookup, based on the
/// \c NL_* constants in \c NameLookupOptions.
///
/// \param[out] decls Will be populated with the declarations found by name
/// lookup.
///
/// \returns true if anything was found.
bool lookupQualified(ArrayRef<TypeDecl *> types, DeclName member,
NLOptions options,
SmallVectorImpl<ValueDecl *> &decls) const;

/// Perform qualified lookup for the given member in the given module.
bool lookupQualified(ModuleDecl *module, DeclName member, NLOptions options,
SmallVectorImpl<ValueDecl *> &decls) const;

/// Perform \c AnyObject lookup for the given member.
bool lookupAnyObject(DeclName member, NLOptions options,
SmallVectorImpl<ValueDecl *> &decls) const;

/// Look up all Objective-C methods with the given selector visible
/// in the enclosing module.
void lookupAllObjCMethods(
Expand Down
Loading