Skip to content

Commit 6deacd5

Browse files
committed
---
yaml --- r: 278447 b: refs/heads/swift-5.1-old-llvm-branch c: cd48cd6 h: refs/heads/master i: 278445: bcbc72d 278443: f59f800 278439: da50a4c 278431: f6b73dc
1 parent 6ca2804 commit 6deacd5

File tree

4 files changed

+556
-567
lines changed

4 files changed

+556
-567
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: 1595efe5e2dc5891aa617f4972c9c2f72d58346c
1244+
refs/heads/swift-5.1-old-llvm-branch: cd48cd6eb35a7700b47cbb7d194bc3733f05c601
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 & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -445,28 +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);
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)
456+
->forAllVisibleModules(ModuleDecl::AccessPathTy(), fn);
457+
}
458+
459+
/// Only name lookup has gathered a set of results, perform any necessary
460+
/// steps to prune the result set before returning it to the caller.
461+
bool finishLookup(const DeclContext *dc, NLOptions options,
462+
SmallVectorImpl<ValueDecl *> &decls);
463+
464+
template <typename Result>
465+
void filterForDiscriminator(SmallVectorImpl<Result> &results,
466+
DebuggerClient *debugClient);
467+
468+
void recordLookupOfTopLevelName(DeclContext *topLevelContext, DeclName name,
469+
bool isCascading);
470470

471471
} // end namespace namelookup
472472

branches/swift-5.1-old-llvm-branch/lib/AST/NameLookup.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ matchDiscriminator(Identifier discriminator,
513513

514514
template <typename Result>
515515
void namelookup::filterForDiscriminator(SmallVectorImpl<Result> &results,
516-
DebuggerClient *debugClient) {
516+
DebuggerClient *debugClient) {
517517
Identifier discriminator = debugClient->getPreferredPrivateDiscriminator();
518518
if (discriminator.empty())
519519
return;
@@ -537,16 +537,11 @@ void namelookup::filterForDiscriminator(SmallVectorImpl<Result> &results,
537537
results.push_back(lastMatch);
538538
}
539539

540-
template
541-
void namelookup::filterForDiscriminator<LookupResultEntry>
542-
(SmallVectorImpl<LookupResultEntry> &results,
543-
DebuggerClient *debugClient);
544-
545-
540+
template void namelookup::filterForDiscriminator<LookupResultEntry>(
541+
SmallVectorImpl<LookupResultEntry> &results, DebuggerClient *debugClient);
546542

547543
void namelookup::recordLookupOfTopLevelName(DeclContext *topLevelContext,
548-
DeclName name,
549-
bool isCascading) {
544+
DeclName name, bool isCascading) {
550545
auto SF = dyn_cast<SourceFile>(topLevelContext);
551546
if (!SF)
552547
return;
@@ -1378,7 +1373,7 @@ static bool isAcceptableLookupResult(const DeclContext *dc,
13781373
}
13791374

13801375
bool namelookup::finishLookup(const DeclContext *dc, NLOptions options,
1381-
SmallVectorImpl<ValueDecl *> &decls) {
1376+
SmallVectorImpl<ValueDecl *> &decls) {
13821377
// If we're supposed to remove overridden declarations, do so now.
13831378
if (options & NL_RemoveOverridden)
13841379
removeOverriddenDecls(decls);

0 commit comments

Comments
 (0)