Skip to content

Commit eff1ed8

Browse files
committed
[cxx-interop] fix how we import CF types.
1 parent 8839229 commit eff1ed8

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
@@ -2712,7 +2712,7 @@ ClangImporter::Implementation::lookupTypedef(clang::DeclarationName name) {
27122712
clang::SourceLocation(),
27132713
clang::Sema::LookupOrdinaryName);
27142714

2715-
if (sema.LookupName(lookupResult, /*scope=*/nullptr)) {
2715+
if (sema.LookupName(lookupResult, sema.TUScope)) {
27162716
for (auto decl : lookupResult) {
27172717
if (auto typedefDecl =
27182718
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)