Skip to content

Commit 7d47cb9

Browse files
committed
[cxx-interop] fix how we import CF types.
1 parent 7216be1 commit 7d47cb9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2757,7 +2757,7 @@ ClangImporter::Implementation::lookupTypedef(clang::DeclarationName name) {
27572757
clang::SourceLocation(),
27582758
clang::Sema::LookupOrdinaryName);
27592759

2760-
if (sema.LookupName(lookupResult, /*scope=*/nullptr)) {
2760+
if (sema.LookupName(lookupResult, sema.TUScope)) {
27612761
for (auto decl : lookupResult) {
27622762
if (auto typedefDecl =
27632763
dyn_cast<clang::TypedefNameDecl>(decl->getUnderlyingDecl()))

test/ClangImporter/cf.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %target-swift-frontend -disable-objc-attr-requires-foundation-module -typecheck -verify -import-cf-types -I %S/Inputs/custom-modules %s
22

3+
// RUN: %target-swift-frontend -disable-objc-attr-requires-foundation-module -typecheck -verify -import-cf-types -enable-experimental-cxx-interop -I %S/Inputs/custom-modules %s
4+
35
// REQUIRES: objc_interop
46

57
import CoreCooling

0 commit comments

Comments
 (0)