summaryrefslogtreecommitdiff
path: root/test/Modules/preprocess-module.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-02 18:30:45 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-02 18:30:45 +0000
commit570918821a8492048e6ab54955c9864bd6c3e952 (patch)
treef9d0d3f3478c298aaf51987483bbbbefe8e6631b /test/Modules/preprocess-module.cpp
parentf0c55418e2b09eaab37c820d3756cc1b4584d084 (diff)
Diffstat (limited to 'test/Modules/preprocess-module.cpp')
-rw-r--r--test/Modules/preprocess-module.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Modules/preprocess-module.cpp b/test/Modules/preprocess-module.cpp
new file mode 100644
index 0000000000000..99fe8cf8c30b0
--- /dev/null
+++ b/test/Modules/preprocess-module.cpp
@@ -0,0 +1,12 @@
+// RUN: rm -rf %t
+
+// RUN: not %clang_cc1 -fmodules -fmodule-name=file -I%S/Inputs/preprocess -x c++-module-map %S/Inputs/preprocess/module.modulemap -E 2>&1 | FileCheck %s --check-prefix=MISSING-FWD
+// MISSING-FWD: module 'fwd' is needed
+
+// RUN: %clang_cc1 -fmodules -fmodule-name=file -fmodules-cache-path=%t -I%S/Inputs/preprocess -x c++-module-map %S/Inputs/preprocess/module.modulemap -E | FileCheck %s
+// CHECK: # 1 "<module-includes>"
+// CHECK: # 1 "{{.*}}file.h" 1
+// CHECK: struct __FILE;
+// CHECK: #pragma clang module import fwd /* clang -E: implicit import for #include "fwd.h" */
+// CHECK: typedef struct __FILE FILE;
+// CHECK: # 2 "<module-includes>" 2