Skip to content

Commit 8da2161

Browse files
committed
---
yaml --- r: 343255 b: refs/heads/master-rebranch c: d280ae4 h: refs/heads/master i: 343253: d94d509 343251: 1df95b1 343247: e920903
1 parent 724cd51 commit 8da2161

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-02-a: ddd2b2976aa9bfde5f20fe37f6bd2
14551455
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-03-a: 171cc166f2abeb5ca2a4003700a8a78a108bd300
14561456
refs/heads/benlangmuir-patch-1: baaebaf39d52f3bf36710d4fe40cf212e996b212
14571457
refs/heads/i-do-redeclare: 8c4e6d5de5c1e3f0a2cedccf319df713ea22c48e
1458-
refs/heads/master-rebranch: 3956fc065388e6af79357bca69e3849df5fd25ab
1458+
refs/heads/master-rebranch: d280ae445193535902dfa0483213e7bedb5ac716
14591459
refs/heads/rdar-53901732: 9bd06af3284e18a109cdbf9aa59d833b24eeca7b
14601460
refs/heads/revert-26776-subst-always-returns-a-type: 1b8e18fdd391903a348970a4c848995d4cdd789c
14611461
refs/heads/tensorflow-merge: 8b854f62f80d4476cb383d43c4aac2001dde3cec

branches/master-rebranch/lib/Sema/TypeCheckAttr.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "swift/AST/DiagnosticsParse.h"
2424
#include "swift/AST/GenericEnvironment.h"
2525
#include "swift/AST/GenericSignatureBuilder.h"
26+
#include "swift/AST/ModuleNameLookup.h"
2627
#include "swift/AST/NameLookup.h"
2728
#include "swift/AST/NameLookupRequests.h"
2829
#include "swift/AST/ParameterList.h"
@@ -1612,15 +1613,13 @@ void AttributeChecker::checkApplicationMainAttribute(DeclAttribute *attr,
16121613
auto KitModule = C.getLoadedModule(Id_Kit);
16131614
ProtocolDecl *ApplicationDelegateProto = nullptr;
16141615
if (KitModule) {
1615-
auto lookupOptions = defaultUnqualifiedLookupOptions;
1616-
lookupOptions |= NameLookupFlags::KnownPrivate;
1617-
1618-
auto lookup = TC.lookupUnqualifiedType(KitModule, Id_ApplicationDelegate,
1619-
SourceLoc(),
1620-
lookupOptions);
1621-
if (lookup.size() == 1)
1622-
ApplicationDelegateProto = dyn_cast<ProtocolDecl>(
1623-
lookup[0].getValueDecl());
1616+
SmallVector<ValueDecl *, 1> decls;
1617+
namelookup::lookupInModule(KitModule, Id_ApplicationDelegate,
1618+
decls, NLKind::QualifiedLookup,
1619+
namelookup::ResolutionKind::TypesOnly,
1620+
KitModule);
1621+
if (decls.size() == 1)
1622+
ApplicationDelegateProto = dyn_cast<ProtocolDecl>(decls[0]);
16241623
}
16251624

16261625
if (!ApplicationDelegateProto ||

0 commit comments

Comments
 (0)