summaryrefslogtreecommitdiff
path: root/test/Preprocessor/pragma_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Preprocessor/pragma_module.c')
-rw-r--r--test/Preprocessor/pragma_module.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Preprocessor/pragma_module.c b/test/Preprocessor/pragma_module.c
new file mode 100644
index 0000000000000..d734f66efcef5
--- /dev/null
+++ b/test/Preprocessor/pragma_module.c
@@ -0,0 +1,11 @@
+// RUN: %clang -cc1 -E -fmodules %s -verify
+
+// Just checking the syntax here; the semantics are tested elsewhere.
+#pragma clang module import // expected-error {{expected identifier in module name}}
+#pragma clang module import ! // expected-error {{expected identifier in module name}}
+#pragma clang module import if // expected-error {{expected identifier in module name}}
+#pragma clang module import foo ? bar // expected-error {{expected '.' or end of directive after module name}}
+#pragma clang module import foo. // expected-error {{expected identifier}}
+#pragma clang module import foo.bar.baz.quux // expected-error {{module 'foo' not found}}
+
+#error here // expected-error {{here}}