summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Index/Core/Inputs/module/ModA.h2
-rw-r--r--clang/test/Index/Core/Inputs/module/module.modulemap1
-rw-r--r--clang/test/Index/Core/index-with-module.m12
3 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/Index/Core/Inputs/module/ModA.h b/clang/test/Index/Core/Inputs/module/ModA.h
new file mode 100644
index 00000000000..081d86cc451
--- /dev/null
+++ b/clang/test/Index/Core/Inputs/module/ModA.h
@@ -0,0 +1,2 @@
+
+void ModA_func(void);
diff --git a/clang/test/Index/Core/Inputs/module/module.modulemap b/clang/test/Index/Core/Inputs/module/module.modulemap
new file mode 100644
index 00000000000..a132562eafd
--- /dev/null
+++ b/clang/test/Index/Core/Inputs/module/module.modulemap
@@ -0,0 +1 @@
+module ModA { header "ModA.h" export * }
diff --git a/clang/test/Index/Core/index-with-module.m b/clang/test/Index/Core/index-with-module.m
new file mode 100644
index 00000000000..646a48a2c93
--- /dev/null
+++ b/clang/test/Index/Core/index-with-module.m
@@ -0,0 +1,12 @@
+// RUN: rm -rf %t.mcp
+// RUN: c-index-test core -print-source-symbols -- %s -I %S/Inputs/module -fmodules -fmodules-cache-path=%t.mcp | FileCheck %s
+
+// CHECK: [[@LINE+1]]:9 | module/C | ModA | Ref |
+@import ModA;
+// CHECK: [[@LINE+1]]:1 | module/C | ModA | Ref,Impl |
+#include "ModA.h"
+
+void foo() {
+ // CHECK: [[@LINE+1]]:3 | function/C | ModA_func | c:@F@ModA_func | {{.*}} | Ref,Call,RelCall | rel: 1
+ ModA_func();
+} \ No newline at end of file
OpenPOWER on IntegriCloud