Skip to content

Commit 6ca2804

Browse files
committed
---
yaml --- r: 278446 b: refs/heads/swift-5.1-old-llvm-branch c: 1595efe h: refs/heads/master
1 parent bcbc72d commit 6ca2804

File tree

5 files changed

+1753
-1659
lines changed

5 files changed

+1753
-1659
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-01-24-a: b6f62823aa5010b2ae53f15f72a57
12411241
refs/heads/marcrasi-astverifier-disable: 3fac766a23a77ebd0640296bfd7fc116ea60a4e0
12421242
refs/heads/revert-22227-a-tall-white-fountain-played: adfce60b2eaa54903ea189bed8a783bca609fa53
12431243
refs/heads/revert-22300-revert-22227-a-tall-white-fountain-played: 5f92040224df7dd4e618fdfb367349df64d8acad
1244-
refs/heads/swift-5.1-old-llvm-branch: 80a234a2ef2d41c7ba5dfbe1a508f20058e5c2fa
1244+
refs/heads/swift-5.1-old-llvm-branch: 1595efe5e2dc5891aa617f4972c9c2f72d58346c
12451245
refs/heads/swift-5.1-branch: 8060872acb4105d9655e020fe047e1ebcd77d0fb
12461246
refs/tags/swift-4.2.2-RELEASE: e429d1f1aaf59e69d38207a96e56265c7f6fccec
12471247
refs/tags/swift-5.0-DEVELOPMENT-SNAPSHOT-2019-02-02-a: 3e5a03d32ff3b1e9af90d6c1198c14f938379a6e

branches/swift-5.1-old-llvm-branch/include/swift/AST/NameLookup.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,28 @@ void lookupInModule(ModuleDecl *module, ModuleDecl::AccessPathTy accessPath,
445445
LazyResolver *typeResolver,
446446
const DeclContext *moduleScopeContext,
447447
ArrayRef<ModuleDecl::ImportedModule> extraImports = {});
448+
449+
template <typename Fn>
450+
void forAllVisibleModules(const DeclContext *DC, const Fn &fn) {
451+
DeclContext *moduleScope = DC->getModuleScopeContext();
452+
if (auto file = dyn_cast<FileUnit>(moduleScope))
453+
file->forAllVisibleModules(fn);
454+
else
455+
cast<ModuleDecl>(moduleScope)->forAllVisibleModules(ModuleDecl::AccessPathTy(), fn);
456+
}
457+
458+
/// Only name lookup has gathered a set of results, perform any necessary
459+
/// steps to prune the result set before returning it to the caller.
460+
bool finishLookup(const DeclContext *dc, NLOptions options,
461+
SmallVectorImpl<ValueDecl *> &decls);
462+
463+
template <typename Result>
464+
void filterForDiscriminator(SmallVectorImpl<Result> &results,
465+
DebuggerClient *debugClient);
466+
467+
void recordLookupOfTopLevelName(DeclContext *topLevelContext,
468+
DeclName name,
469+
bool isCascading);
448470

449471
} // end namespace namelookup
450472

branches/swift-5.1-old-llvm-branch/lib/AST/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ add_swift_host_library(swiftAST STATIC
6262
TypeRefinementContext.cpp
6363
TypeRepr.cpp
6464
TypeWalker.cpp
65+
UnqualifiedLookup.cpp
6566
USRGeneration.cpp
6667

6768
LINK_LIBRARIES

0 commit comments

Comments
 (0)