Skip to content

Commit 5899928

Browse files
authored
Merge branch 'swift-4.0-branch-06-23-2017' into record-conformance-in-source-file-4.0jun23
2 parents 4e49a44 + e5e40e5 commit 5899928

File tree

7 files changed

+26
-2
lines changed

7 files changed

+26
-2
lines changed

lib/ClangImporter/ImportDecl.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7907,8 +7907,9 @@ ClangImporter::Implementation::loadAllMembers(Decl *D, uint64_t extra) {
79077907
for (auto entry : table->lookupGlobalsAsMembers(effectiveClangContext)) {
79087908
auto decl = entry.get<clang::NamedDecl *>();
79097909

7910-
// Only continue members in the same submodule as this extension.
7911-
if (decl->getImportedOwningModule() != submodule) continue;
7910+
// Only include members in the same submodule as this extension.
7911+
if (getClangSubmoduleForDecl(decl) != submodule)
7912+
continue;
79127913

79137914
forEachDistinctName(decl, [&](ImportedName newName,
79147915
ImportNameVersion nameVersion) {
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
struct IAMOuter { int x; };
2+
3+
struct IAMInner { int y; };
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// The order of these forward-declarations affects whether there was a bug.
2+
struct IAMOuter;
3+
struct IAMInner;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Name: ImportAsMemberSubmodules
2+
Tags:
3+
- Name: IAMInner
4+
SwiftName: IAMOuter.Inner
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Umbrella header.
2+
#import <ImportAsMemberSubmodules/Fwd.h>
3+
#import <ImportAsMemberSubmodules/Actual.h>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
framework module ImportAsMemberSubmodules {
2+
umbrella header "ImportAsMemberSubmodules.h"
3+
export *
4+
module * { export * }
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -F %S/Inputs/frameworks %s -verify
2+
3+
import ImportAsMemberSubmodules
4+
5+
let _: IAMOuter.Inner?

0 commit comments

Comments
 (0)