Skip to content

Commit 834ad9e

Browse files
authored
Merge pull request #18317 from DougGregor/refactor-name-lookup
2 parents 14a0519 + 48fb227 commit 834ad9e

File tree

2 files changed

+308
-179
lines changed

2 files changed

+308
-179
lines changed

include/swift/AST/DeclContext.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,32 @@ class alignas(1 << DeclContextAlignInBits) DeclContext {
486486
LazyResolver *typeResolver,
487487
SmallVectorImpl<ValueDecl *> &decls) const;
488488

489+
/// Look for the set of declarations with the given name within the
490+
/// given set of type declarations.
491+
///
492+
/// \param types The type declarations to look into.
493+
///
494+
/// \param member The member to search for.
495+
///
496+
/// \param options Options that control name lookup, based on the
497+
/// \c NL_* constants in \c NameLookupOptions.
498+
///
499+
/// \param[out] decls Will be populated with the declarations found by name
500+
/// lookup.
501+
///
502+
/// \returns true if anything was found.
503+
bool lookupQualified(ArrayRef<TypeDecl *> types, DeclName member,
504+
NLOptions options,
505+
SmallVectorImpl<ValueDecl *> &decls) const;
506+
507+
/// Perform qualified lookup for the given member in the given module.
508+
bool lookupQualified(ModuleDecl *module, DeclName member, NLOptions options,
509+
SmallVectorImpl<ValueDecl *> &decls) const;
510+
511+
/// Perform \c AnyObject lookup for the given member.
512+
bool lookupAnyObject(DeclName member, NLOptions options,
513+
SmallVectorImpl<ValueDecl *> &decls) const;
514+
489515
/// Look up all Objective-C methods with the given selector visible
490516
/// in the enclosing module.
491517
void lookupAllObjCMethods(

0 commit comments

Comments
 (0)