summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/modules-ts/basic/basic.link/module-declaration.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-04-14 08:06:59 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-04-14 08:06:59 +0000
commitd652bdd05f1c6a7f732fc01009ce68f7190d0e3d (patch)
treea803f9072874de1deca5bcc531ce1dbad1d2f11a /clang/test/CXX/modules-ts/basic/basic.link/module-declaration.cpp
parentde20429cfc00f8d962c41a42024e8309bdda29ed (diff)
downloadbcm5719-llvm-d652bdd05f1c6a7f732fc01009ce68f7190d0e3d.tar.gz
bcm5719-llvm-d652bdd05f1c6a7f732fc01009ce68f7190d0e3d.zip
[c++20] Parsing support for module-declarations, import-declarations,
and the global and private module fragment. For now, the private module fragment introducer is ignored, but use of the global module fragment introducer should be properly enforced. llvm-svn: 358353
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.cpp34
1 files changed, 13 insertions, 21 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 feb0afdda07..7615536b81f 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
@@ -10,47 +10,39 @@
//
// Module implementation for unknown and known module. (The former is ill-formed.)
// 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: -DTEST=1 -DEXPORT= -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: -DTEST=2 -DEXPORT= -DMODULE_NAME=x
//
// Module interface for unknown and known module. (The latter is ill-formed due to
// redefinition.)
// 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: -DTEST=3 -DEXPORT=export -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= -DMODULE_NAME=x
-//
-// Defining a module partition.
-// RUN: %clang_cc1 -std=c++1z -fmodules-ts -I%t -fmodule-file=%t/x.y.pcm -verify %s \
-// RUN: -DTEST=5 -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=6 -DEXPORT= -DPARTITION=partition -DMODULE_NAME=z
+// RUN: -DTEST=4 -DEXPORT=export -DMODULE_NAME=x
//
// Miscellaneous syntax.
// 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: -DTEST=7 -DEXPORT=export -DMODULE_NAME='z elderberry'
// RUN: %clang_cc1 -std=c++1z -fmodules-ts -I%t -fmodule-file=%t/x.y.pcm -verify %s \
-// RUN: -DTEST=8 -DEXPORT=export -DPARTITION= -DMODULE_NAME='z [[]]'
+// RUN: -DTEST=8 -DEXPORT=export -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=export -DPARTITION= -DMODULE_NAME='z [[fancy]]'
+// RUN: -DTEST=9 -DEXPORT=export -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=export -DPARTITION= -DMODULE_NAME='z [[maybe_unused]]'
+// RUN: -DTEST=10 -DEXPORT=export -DMODULE_NAME='z [[maybe_unused]]'
-EXPORT module PARTITION MODULE_NAME;
+EXPORT module MODULE_NAME;
#if TEST == 4
// expected-error@-2 {{redefinition of module 'x'}}
// expected-note-re@module-declaration.cpp:* {{loaded from '{{.*[/\\]}}x.pcm'}}
-#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 {{definition of module 'elderberry' is not available}}
+// expected-error@-5 {{expected ';'}} expected-error@-5 {{requires a type specifier}}
#elif TEST == 9
-// expected-warning@-9 {{unknown attribute 'fancy' ignored}}
+// expected-warning@-7 {{unknown attribute 'fancy' ignored}}
#elif TEST == 10
-// expected-error-re@-11 {{'maybe_unused' attribute cannot be applied to a module{{$}}}}
+// expected-error-re@-9 {{'maybe_unused' attribute cannot be applied to a module{{$}}}}
#elif TEST == 1
-// expected-error@-13 {{definition of module 'z' is not available}}
+// expected-error@-11 {{definition of module 'z' is not available}}
#else
// expected-no-diagnostics
#endif
OpenPOWER on IntegriCloud