2 // RUN: split-file %s %t
3 // RUN: %clang_cc1 -extract-api --pretty-sgf --emit-sgf-symbol-labels-for-testing \
4 // RUN: --emit-extension-symbol-graphs --symbol-graph-dir=%t/symbols \
5 // RUN: --product-name=Module -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/modules-cache \
6 // RUN: -triple arm64-apple-macosx -x objective-c-header %t/input.h -verify
7 // RUN: %clang_cc1 -extract-api --pretty-sgf --emit-sgf-symbol-labels-for-testing \
8 // RUN: --product-name=Module -o %t/ModuleNoExt.symbols.json -triple arm64-apple-macosx \
9 // RUN: -x objective-c-header %t/input.h
12 #include "ExternalModule.h"
14 @interface ExtInterface (Category)
15 @property int Property;
16 - (void)InstanceMethod;
20 @interface ModInterface
23 // expected-no-diagnostics
25 //--- ExternalModule.h
26 @interface ExtInterface
29 //--- module.modulemap
30 module ExternalModule {
31 header "ExternalModule.h"
34 // Main symbol graph from the build with extension SGFs
35 // RUN: FileCheck %s --input-file %t/symbols/Module.symbols.json --check-prefix MOD
37 // MOD-NOT: "!testRelLabel": "memberOf $ c:objc(cs)ExtInterface(py)Property $ c:objc(cs)ExtInterface"
38 // MOD-NOT: "!testRelLabel": "memberOf $ c:objc(cs)ExtInterface(im)InstanceMethod $ c:objc(cs)ExtInterface"
39 // MOD-NOT: "!testRelLabel": "memberOf $ c:objc(cs)ExtInterface(cm)ClassMethod $ c:objc(cs)ExtInterface"
40 // MOD-NOT: "c:objc(cs)ExtInterface(py)Property"
41 // MOD-NOT: "c:objc(cs)ExtInterface(im)InstanceMethod"
42 // MOD-NOT: "c:objc(cs)ExtInterface(cm)ClassMethod"
43 // MOD-NOT: "c:objc(cs)ExtInterface"
44 // MOD-DAG: "c:objc(cs)ModInterface"
46 // Symbol graph from the build without extension SGFs should be identical to main symbol graph with extension SGFs
47 // RUN: diff %t/symbols/Module.symbols.json %t/ModuleNoExt.symbols.json
49 // RUN: FileCheck %s --input-file %t/symbols/ExternalModule@Module.symbols.json --check-prefix EXT
50 // EXT-DAG: "!testRelLabel": "memberOf $ c:objc(cs)ExtInterface(py)Property $ c:objc(cs)ExtInterface"
51 // EXT-DAG: "!testRelLabel": "memberOf $ c:objc(cs)ExtInterface(im)InstanceMethod $ c:objc(cs)ExtInterface"
52 // EXT-DAG: "!testRelLabel": "memberOf $ c:objc(cs)ExtInterface(cm)ClassMethod $ c:objc(cs)ExtInterface"
53 // EXT-DAG: "!testLabel": "c:objc(cs)ExtInterface(py)Property"
54 // EXT-DAG: "!testLabel": "c:objc(cs)ExtInterface(im)InstanceMethod"
55 // EXT-DAG: "!testLabel": "c:objc(cs)ExtInterface(cm)ClassMethod"
56 // EXT-NOT: "!testLabel": "c:objc(cs)ExtInterface"
57 // EXT-NOT: "!testLabel": "c:objc(cs)ModInterface"