diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Modules/import-self.m | 11 | ||||
-rw-r--r-- | clang/test/Modules/submodules.cpp | 6 |
2 files changed, 11 insertions, 6 deletions
diff --git a/clang/test/Modules/import-self.m b/clang/test/Modules/import-self.m new file mode 100644 index 00000000000..68be565eaf4 --- /dev/null +++ b/clang/test/Modules/import-self.m @@ -0,0 +1,11 @@ +// RUN: rm -rf %t +// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t \ +// RUN: -I %S/Inputs/submodules %s 2>&1 | FileCheck %s +// CHECK: import of module 'import_self.c' appears within same top-level module 'import_self' + +// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t \ +// RUN: -I %S/Inputs/submodules -fmodule-name=import_self %s \ +// RUN: 2>&1 | FileCheck -check-prefix=CHECK-fmodule-name %s +// CHECK-fmodule-name: import of module 'import_self.b' appears within same top-level module 'import_self' + +@import import_self.b; diff --git a/clang/test/Modules/submodules.cpp b/clang/test/Modules/submodules.cpp index 7ef785c936c..c3b2623016a 100644 --- a/clang/test/Modules/submodules.cpp +++ b/clang/test/Modules/submodules.cpp @@ -26,9 +26,3 @@ hash_map<int, float> ints_to_floats; // expected-error{{declaration of 'hash_map @import std.hash_map; hash_map<int, float> ints_to_floats2; - -@import import_self.b; -extern MyTypeA import_self_test_a; // expected-error {{must be imported from module 'import_self.a'}} -// expected-note@import-self-a.h:1 {{here}} -extern MyTypeC import_self_test_c; -extern MyTypeD import_self_test_d; |