File tree Expand file tree Collapse file tree 5 files changed +24
-1
lines changed
Inputs/Frameworks/CXXInteropKit.framework Expand file tree Collapse file tree 5 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -810,7 +810,8 @@ void Sema::ProcessAPINotes(Decl *D) {
810
810
return ;
811
811
812
812
// Globals.
813
- if (D->getDeclContext ()->isFileContext ()) {
813
+ if (D->getDeclContext ()->isFileContext () ||
814
+ D->getDeclContext ()->isExternCContext ()) {
814
815
// Global variables.
815
816
if (auto VD = dyn_cast<VarDecl>(D)) {
816
817
for (auto Reader : APINotes.findAPINotes (D->getLocation ())) {
Original file line number Diff line number Diff line change
1
+ ---
2
+ Name: CxxInterop
3
+ Classes:
4
+ - Name: NSSomeClass
5
+ SwiftName: SomeClass
Original file line number Diff line number Diff line change
1
+ @interface NSSomeClass
2
+ -(instancetype )init;
3
+ @end
Original file line number Diff line number Diff line change
1
+ framework module CxxInteropKit [extern_c] {
2
+ umbrella header "CxxInteropKit.h"
3
+ export *
4
+ module * { export * }
5
+ }
Original file line number Diff line number Diff line change
1
+ // RUN: rm -rf %t && mkdir -p %t
2
+ // RUN: %clang_cc1 -fmodules -fblocks -fimplicit-module-maps -fmodules-cache-path=%t/ModulesCache/CxxInterop -fdisable-module-hash -fapinotes-modules -fsyntax-only -I %S/Inputs/Headers -F %S/Inputs/Frameworks %s -x objective-c++
3
+ // RUN: %clang_cc1 -fmodules -fblocks -fimplicit-module-maps -fmodules-cache-path=%t/ModulesCache/CxxInterop -fdisable-module-hash -fapinotes-modules -fsyntax-only -I %S/Inputs/Headers -F %S/Inputs/Frameworks %s -ast-dump -ast-dump-filter SomeClass -x objective-c++ | FileCheck %s
4
+
5
+ #import < CxxInteropKit/CxxInteropKit.h>
6
+
7
+ // CHECK: Dumping NSSomeClass:
8
+ // CHECK-NEXT: ObjCInterfaceDecl {{.+}} imported in CxxInteropKit <undeserialized declarations> NSSomeClass
9
+ // CHECK-NEXT: SwiftNameAttr {{.+}} <<invalid sloc>> "SomeClass"
You can’t perform that action at this time.
0 commit comments