diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-10-10 22:35:27 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-10-10 22:35:27 +0000 |
commit | d97d35e1500d98f4f50938c5ecae98a1301a9a10 (patch) | |
tree | a25dd0bc78652222302147ca3b1cb546f9b7c6ad /clang/test/CXX/modules-ts/basic/basic.link/module-declaration.cpp | |
parent | 149178d92bf4d405e71fabb4d93204292f89acc2 (diff) | |
download | bcm5719-llvm-d97d35e1500d98f4f50938c5ecae98a1301a9a10.tar.gz bcm5719-llvm-d97d35e1500d98f4f50938c5ecae98a1301a9a10.zip |
[Modules TS] Diagnose attempts to enter module implementation units without the module interface being available.
llvm-svn: 315381
Diffstat (limited to 'clang/test/CXX/modules-ts/basic/basic.link/module-declaration.cpp')
-rw-r--r-- | clang/test/CXX/modules-ts/basic/basic.link/module-declaration.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/test/CXX/modules-ts/basic/basic.link/module-declaration.cpp b/clang/test/CXX/modules-ts/basic/basic.link/module-declaration.cpp index 3c0ac5d2a11..feb0afdda07 100644 --- a/clang/test/CXX/modules-ts/basic/basic.link/module-declaration.cpp +++ b/clang/test/CXX/modules-ts/basic/basic.link/module-declaration.cpp @@ -9,7 +9,6 @@ // 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 // // Module implementation for unknown and known module. (The former is ill-formed.) -// FIXME: TEST=1 should fail because we don't have an interface for module 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 \ @@ -32,11 +31,11 @@ // RUN: %clang_cc1 -std=c++1z -fmodules-ts -I%t -fmodule-file=%t/x.y.pcm -verify %s \ // RUN: -DTEST=7 -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=8 -DEXPORT= -DPARTITION= -DMODULE_NAME='z [[]]' +// RUN: -DTEST=8 -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=9 -DEXPORT= -DPARTITION= -DMODULE_NAME='z [[fancy]]' +// RUN: -DTEST=9 -DEXPORT=export -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=10 -DEXPORT= -DPARTITION= -DMODULE_NAME='z [[maybe_unused]]' +// RUN: -DTEST=10 -DEXPORT=export -DPARTITION= -DMODULE_NAME='z [[maybe_unused]]' EXPORT module PARTITION MODULE_NAME; #if TEST == 4 @@ -45,11 +44,13 @@ EXPORT module PARTITION MODULE_NAME; #elif TEST == 6 // expected-error@-5 {{module partition must be declared 'export'}} #elif TEST == 7 -// expected-error@-7 {{expected ';'}} expected-error@-7 {{requires a type specifier}} +// expected-error@-7 {{expected ';'}} expected-error@-7 {{requires a type specifier}} expected-error@-7 {{definition of module 'elderberry' is not available}} #elif TEST == 9 // expected-warning@-9 {{unknown attribute 'fancy' ignored}} #elif TEST == 10 // expected-error-re@-11 {{'maybe_unused' attribute cannot be applied to a module{{$}}}} +#elif TEST == 1 +// expected-error@-13 {{definition of module 'z' is not available}} #else // expected-no-diagnostics #endif |