aboutsummaryrefslogtreecommitdiff
path: root/test/Modules/requires.mm
diff options
context:
space:
mode:
Diffstat (limited to 'test/Modules/requires.mm')
-rw-r--r--test/Modules/requires.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Modules/requires.mm b/test/Modules/requires.mm
new file mode 100644
index 000000000000..736f2fab646a
--- /dev/null
+++ b/test/Modules/requires.mm
@@ -0,0 +1,6 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fmodules -F %S/Inputs %s -verify
+
+@import DependsOnModule.CXX;
+@import DependsOnModule.NotCXX; // expected-error{{module 'DependsOnModule.NotCXX' is incompatible with feature 'cplusplus'}}
+@import DependsOnModule.NotObjC; // expected-error{{module 'DependsOnModule.NotObjC' is incompatible with feature 'objc'}}