diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
commit | 461a67fa15370a9ec88f8f8a240bf7c123bb2029 (patch) | |
tree | 6942083d7d56bba40ec790a453ca58ad3baf6832 /test/CXX/modules-ts/dcl.dcl/dcl.module/p1.cpp | |
parent | 75c3240472ba6ac2669ee72ca67eb72d4e2851fc (diff) |
Vendor import of clang trunk r321017:vendor/clang/clang-trunk-r321017
Notes
Notes:
svn path=/vendor/clang/dist/; revision=326941
svn path=/vendor/clang/clang-trunk-r321017/; revision=326942; tag=vendor/clang/clang-trunk-r321017
Diffstat (limited to 'test/CXX/modules-ts/dcl.dcl/dcl.module/p1.cpp')
-rw-r--r-- | test/CXX/modules-ts/dcl.dcl/dcl.module/p1.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CXX/modules-ts/dcl.dcl/dcl.module/p1.cpp b/test/CXX/modules-ts/dcl.dcl/dcl.module/p1.cpp new file mode 100644 index 000000000000..2393aa184317 --- /dev/null +++ b/test/CXX/modules-ts/dcl.dcl/dcl.module/p1.cpp @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -std=c++17 -fmodules-ts -verify %s -DFOO=export -DBAR=export +// RUN: %clang_cc1 -std=c++17 -fmodules-ts -verify %s -DFOO=export -DBAR= +// RUN: %clang_cc1 -std=c++17 -fmodules-ts %s -DFOO=export -emit-module-interface -o %t +// RUN: %clang_cc1 -std=c++17 -fmodules-ts %s -fmodule-file=%t -DFOO= +// RUN: %clang_cc1 -std=c++17 -fmodules-ts %s -fmodule-file=%t -DBAR=export +// RUN: %clang_cc1 -std=c++17 -fmodules-ts -verify %s -fmodule-file=%t -DFOO= -DBAR=export + +#ifdef FOO +FOO module foo; // expected-note {{previous module declaration is here}} +#endif + +#ifdef BAR +BAR module bar; // expected-error {{translation unit contains multiple module declarations}} +#endif |