diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-04-22 00:47:53 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-04-22 00:47:53 +0000 |
commit | f6333015598c753d3d07062eea2a6bff85416b1b (patch) | |
tree | bffa738c53b6309abe3506b30a66b6e79843eea9 /test/Parser | |
parent | ea2cb09d2a0e05a65260467c961cb7b4c2b589d1 (diff) |
Rearrange some Modules TS testcases into test/CXX/modules-ts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301066 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser')
-rw-r--r-- | test/Parser/cxx-modules-import.cpp | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/test/Parser/cxx-modules-import.cpp b/test/Parser/cxx-modules-import.cpp deleted file mode 100644 index 98c483838f..0000000000 --- a/test/Parser/cxx-modules-import.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// RUN: rm -rf %t -// RUN: mkdir -p %t -// RUN: echo 'export module x; int a, b;' > %t/x.cppm -// RUN: echo 'export module x.y; int c;' > %t/x.y.cppm -// -// RUN: %clang_cc1 -std=c++1z -fmodules-ts -emit-module-interface %t/x.cppm -o %t/x.pcm -// RUN: %clang_cc1 -std=c++1z -fmodules-ts -emit-module-interface -fmodule-file=%t/x.pcm %t/x.y.cppm -o %t/x.y.pcm -// -// RUN: %clang_cc1 -std=c++1z -fmodules-ts -I%t -fmodule-file=%t/x.y.pcm -verify %s \ -// RUN: -DTEST=1 -DEXPORT= -DPARTITION= -DMODULE_NAME=z -// RUN: %clang_cc1 -std=c++1z -fmodules-ts -I%t -fmodule-file=%t/x.y.pcm -verify %s \ -// RUN: -DTEST=2 -DEXPORT= -DPARTITION= -DMODULE_NAME=x -// RUN: %clang_cc1 -std=c++1z -fmodules-ts -I%t -fmodule-file=%t/x.y.pcm -verify %s \ -// RUN: -DTEST=3 -DEXPORT=export -DPARTITION= -DMODULE_NAME=z -// RUN: %clang_cc1 -std=c++1z -fmodules-ts -I%t -fmodule-file=%t/x.y.pcm -verify %s \ -// RUN: -DTEST=4 -DEXPORT=export -DPARTITION=partition -DMODULE_NAME=z -// RUN: %clang_cc1 -std=c++1z -fmodules-ts -I%t -fmodule-file=%t/x.y.pcm -verify %s \ -// RUN: -DTEST=5 -DEXPORT= -DPARTITION=elderberry -DMODULE_NAME=z -// RUN: %clang_cc1 -std=c++1z -fmodules-ts -I%t -fmodule-file=%t/x.y.pcm -verify %s \ -// RUN: -DTEST=1 -DEXPORT= -DPARTITION= -DMODULE_NAME='z [[]]' -// RUN: %clang_cc1 -std=c++1z -fmodules-ts -I%t -fmodule-file=%t/x.y.pcm -verify %s \ -// RUN: -DTEST=6 -DEXPORT= -DPARTITION= -DMODULE_NAME='z [[fancy]]' -// RUN: %clang_cc1 -std=c++1z -fmodules-ts -I%t -fmodule-file=%t/x.y.pcm -verify %s \ -// RUN: -DTEST=7 -DEXPORT= -DPARTITION= -DMODULE_NAME='z [[maybe_unused]]' -// RUN: %clang_cc1 -std=c++1z -fmodules-ts -I%t -fmodule-file=%t/x.y.pcm -verify %s \ -// RUN: -DTEST=8 -DEXPORT= -DPARTITION=partition -DMODULE_NAME=z - -EXPORT module PARTITION MODULE_NAME; -#if TEST == 3 || TEST == 4 -// ok, building object code for module interface -#elif TEST == 5 -// expected-error@-4 {{expected ';'}} expected-error@-4 {{requires a type specifier}} -#elif TEST == 6 -// expected-warning@-6 {{unknown attribute 'fancy' ignored}} -#elif TEST == 7 -// expected-error-re@-8 {{'maybe_unused' attribute cannot be applied to a module{{$}}}} -#elif TEST == 8 -// expected-error@-10 {{module partition must be declared 'export'}} -#endif - -int use_1 = a; -#if TEST != 2 -// expected-error@-2 {{declaration of 'a' must be imported from module 'x' before it is required}} -// expected-note@x.cppm:1 {{here}} -#endif - -import x; - -int use_2 = b; // ok - -import x [[]]; -import x [[foo]]; // expected-warning {{unknown attribute 'foo' ignored}} -import x [[noreturn]]; // expected-error {{'noreturn' attribute cannot be applied to a module import}} -import x [[blarg::noreturn]]; // expected-warning {{unknown attribute 'noreturn' ignored}} - -import x.y; -import x.; // expected-error {{expected a module name after 'import'}} -import .x; // expected-error {{expected a module name after 'import'}} - -import blarg; // expected-error {{module 'blarg' not found}} |