diff options
24 files changed, 411 insertions, 19 deletions
diff --git a/libcxx/include/experimental/any b/libcxx/include/experimental/any index 1dcdd0f25ec..d9c95342589 100644 --- a/libcxx/include/experimental/any +++ b/libcxx/include/experimental/any @@ -1,11 +1,21 @@ // -*- C++ -*- -//===------------------------------ any -----------------------------------===// +//===------------------------------- any ----------------------------------===// // // The LLVM Compiler Infrastructure // -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +#ifndef _LIBCPP_EXPERIMENTAL_ANY +#define _LIBCPP_EXPERIMENTAL_ANY -#error "<experimental/any> has been removed. Use <any> instead." +#include <__config> + +#ifdef _LIBCPP_WARNING +_LIBCPP_WARNING("<experimental/any> has been removed. Use <any> instead.") +#else +# warning "<experimental/any> has been removed. Use <any> instead." +#endif + +#endif // _LIBCPP_EXPERIMENTAL_ANY diff --git a/libcxx/include/experimental/chrono b/libcxx/include/experimental/chrono index 591cf7160c1..30c7e4a9d5a 100644 --- a/libcxx/include/experimental/chrono +++ b/libcxx/include/experimental/chrono @@ -1,11 +1,21 @@ // -*- C++ -*- -//===------------------------------ chrono ---------------------------------===// +//===---------------------------- chrono ----------------------------------===// // // The LLVM Compiler Infrastructure // -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +#ifndef _LIBCPP_EXPERIMENTAL_CHRONO +#define _LIBCPP_EXPERIMENTAL_CHRONO -#error "<experimental/chrono> has been removed. Use <chrono> instead." +#include <__config> + +#ifdef _LIBCPP_WARNING +_LIBCPP_WARNING("<experimental/chrono> has been removed. Use <chrono> instead.") +#else +# warning "<experimental/chrono> has been removed. Use <chrono> instead." +#endif + +#endif // _LIBCPP_EXPERIMENTAL_CHRONO diff --git a/libcxx/include/experimental/numeric b/libcxx/include/experimental/numeric index 14a664011b5..19c65313f0f 100644 --- a/libcxx/include/experimental/numeric +++ b/libcxx/include/experimental/numeric @@ -7,5 +7,15 @@ // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +#ifndef _LIBCPP_EXPERIMENTAL_NUMERIC +#define _LIBCPP_EXPERIMENTAL_NUMERIC -#error "<experimental/numeric> has been removed. Use <numeric> instead." +#include <__config> + +#ifdef _LIBCPP_WARNING +_LIBCPP_WARNING("<experimental/numeric> has been removed. Use <numeric> instead.") +#else +# warning "<experimental/numeric> has been removed. Use <numeric> instead." +#endif + +#endif // _LIBCPP_EXPERIMENTAL_NUMERIC diff --git a/libcxx/include/experimental/optional b/libcxx/include/experimental/optional index d68cefdf6c1..6eb4a2618d2 100644 --- a/libcxx/include/experimental/optional +++ b/libcxx/include/experimental/optional @@ -7,5 +7,15 @@ // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +#ifndef _LIBCPP_EXPERIMENTAL_OPTIONAL +#define _LIBCPP_EXPERIMENTAL_OPTIONAL -#error "<experimental/optional> has been removed. Use <optional> instead." +#include <__config> + +#ifdef _LIBCPP_WARNING +_LIBCPP_WARNING("<experimental/optional> has been removed. Use <optional> instead.") +#else +# warning "<experimental/optional> has been removed. Use <optional> instead." +#endif + +#endif // _LIBCPP_EXPERIMENTAL_OPTIONAL diff --git a/libcxx/include/experimental/ratio b/libcxx/include/experimental/ratio index 9c2bf2e4624..52c12004dba 100644 --- a/libcxx/include/experimental/ratio +++ b/libcxx/include/experimental/ratio @@ -1,11 +1,21 @@ // -*- C++ -*- -//===------------------------------ ratio ---------------------------------===// +//===----------------------------- ratio ----------------------------------===// // // The LLVM Compiler Infrastructure // -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +#ifndef _LIBCPP_EXPERIMENTAL_RATIO +#define _LIBCPP_EXPERIMENTAL_RATIO -#error "<experimental/ratio> has been removed. Use <ratio> instead." +#include <__config> + +#ifdef _LIBCPP_WARNING +_LIBCPP_WARNING("<experimental/ratio> has been removed. Use <ratio> instead.") +#else +# warning "<experimental/ratio> has been removed. Use <ratio> instead." +#endif + +#endif // _LIBCPP_EXPERIMENTAL_RATIO diff --git a/libcxx/include/experimental/string_view b/libcxx/include/experimental/string_view index f13bff54d53..100bdfe7273 100644 --- a/libcxx/include/experimental/string_view +++ b/libcxx/include/experimental/string_view @@ -3,9 +3,19 @@ // // The LLVM Compiler Infrastructure // -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +#ifndef _LIBCPP_EXPERIMENTAL_STRING_VIEW +#define _LIBCPP_EXPERIMENTAL_STRING_VIEW -#error "<experimental/string_view> has been removed. Use <string_view> instead." +#include <__config> + +#ifdef _LIBCPP_WARNING +_LIBCPP_WARNING("<experimental/string_view> has been removed. Use <string_view> instead.") +#else +# warning "<experimental/string_view> has been removed. Use <string_view> instead." +#endif + +#endif // _LIBCPP_EXPERIMENTAL_STRING_VIEW diff --git a/libcxx/include/experimental/system_error b/libcxx/include/experimental/system_error index 7937357fa14..1cf84ee0125 100644 --- a/libcxx/include/experimental/system_error +++ b/libcxx/include/experimental/system_error @@ -7,5 +7,15 @@ // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +#ifndef _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR +#define _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR -#error "<experimental/system_error> has been removed. Use <system_error> instead." +#include <__config> + +#ifdef _LIBCPP_WARNING +_LIBCPP_WARNING("<experimental/system_error> has been removed. Use <system_error> instead.") +#else +# warning "<experimental/system_error> has been removed. Use <system_error> instead." +#endif + +#endif // _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR diff --git a/libcxx/include/experimental/tuple b/libcxx/include/experimental/tuple index 1f37a6293ba..6d71bb559b0 100644 --- a/libcxx/include/experimental/tuple +++ b/libcxx/include/experimental/tuple @@ -7,5 +7,15 @@ // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +#ifndef _LIBCPP_EXPERIMENTAL_TUPLE +#define _LIBCPP_EXPERIMENTAL_TUPLE -#error "<experimental/tuple> has been removed. Use <tuple> instead." +#include <__config> + +#ifdef _LIBCPP_WARNING +_LIBCPP_WARNING("<experimental/tuple> has been removed. Use <tuple> instead.") +#else +# warning "<experimental/tuple> has been removed. Use <tuple> instead." +#endif + +#endif // _LIBCPP_EXPERIMENTAL_TUPLE diff --git a/libcxx/test/libcxx/experimental/diagnostics/syserr/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/diagnostics/syserr/use_header_warning.fail.cpp new file mode 100644 index 00000000000..074a9c58c61 --- /dev/null +++ b/libcxx/test/libcxx/experimental/diagnostics/syserr/use_header_warning.fail.cpp @@ -0,0 +1,18 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// REQUIRES: verify-support + +// <experimental/system_error> + +#include <experimental/system_error> + +// expected-error@experimental/system_error:* {{"<experimental/system_error> has been removed. Use <system_error> instead."}} + +int main() {} diff --git a/libcxx/test/libcxx/experimental/diagnostics/syserr/version.pass.cpp b/libcxx/test/libcxx/experimental/diagnostics/syserr/version.pass.cpp new file mode 100644 index 00000000000..c4fb9593a9e --- /dev/null +++ b/libcxx/test/libcxx/experimental/diagnostics/syserr/version.pass.cpp @@ -0,0 +1,21 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <experimental/system_error> + +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-W#warnings" +#endif +#include <experimental/system_error> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() {} diff --git a/libcxx/test/libcxx/experimental/numerics/numeric.ops/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/numerics/numeric.ops/use_header_warning.fail.cpp new file mode 100644 index 00000000000..32fd0527d48 --- /dev/null +++ b/libcxx/test/libcxx/experimental/numerics/numeric.ops/use_header_warning.fail.cpp @@ -0,0 +1,18 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// REQUIRES: verify-support + +// <experimental/numeric> + +#include <experimental/numeric> + +// expected-error@experimental/numeric:* {{"<experimental/numeric> has been removed. Use <numeric> instead."}} + +int main() {} diff --git a/libcxx/test/libcxx/experimental/numerics/numeric.ops/version.pass.cpp b/libcxx/test/libcxx/experimental/numerics/numeric.ops/version.pass.cpp new file mode 100644 index 00000000000..37ac584a7cd --- /dev/null +++ b/libcxx/test/libcxx/experimental/numerics/numeric.ops/version.pass.cpp @@ -0,0 +1,21 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <experimental/numeric> + +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-W#warnings" +#endif +#include <experimental/numeric> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() {} diff --git a/libcxx/test/libcxx/experimental/strings/string.view/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/strings/string.view/use_header_warning.fail.cpp new file mode 100644 index 00000000000..64f73742099 --- /dev/null +++ b/libcxx/test/libcxx/experimental/strings/string.view/use_header_warning.fail.cpp @@ -0,0 +1,18 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// REQUIRES: verify-support + +// <experimental/string_view> + +#include <experimental/string_view> + +// expected-error@experimental/string_view:* {{"<experimental/string_view> has been removed. Use <string_view> instead."}} + +int main() {} diff --git a/libcxx/test/libcxx/experimental/strings/string.view/version.pass.cpp b/libcxx/test/libcxx/experimental/strings/string.view/version.pass.cpp new file mode 100644 index 00000000000..417982e3669 --- /dev/null +++ b/libcxx/test/libcxx/experimental/strings/string.view/version.pass.cpp @@ -0,0 +1,21 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <experimental/string_view> + +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-W#warnings" +#endif +#include <experimental/string_view> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() {} diff --git a/libcxx/test/libcxx/experimental/utilities/any/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/utilities/any/use_header_warning.fail.cpp new file mode 100644 index 00000000000..0bcda7056b4 --- /dev/null +++ b/libcxx/test/libcxx/experimental/utilities/any/use_header_warning.fail.cpp @@ -0,0 +1,18 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// REQUIRES: verify-support + +// <experimental/any> + +#include <experimental/any> + +// expected-error@experimental/any:* {{"<experimental/any> has been removed. Use <any> instead."}} + +int main() {} diff --git a/libcxx/test/libcxx/experimental/utilities/any/version.pass.cpp b/libcxx/test/libcxx/experimental/utilities/any/version.pass.cpp new file mode 100644 index 00000000000..bc37d8b4dbf --- /dev/null +++ b/libcxx/test/libcxx/experimental/utilities/any/version.pass.cpp @@ -0,0 +1,21 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <experimental/any> + +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-W#warnings" +#endif +#include <experimental/any> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() {} diff --git a/libcxx/test/libcxx/experimental/utilities/optional/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/utilities/optional/use_header_warning.fail.cpp new file mode 100644 index 00000000000..1711d2f0374 --- /dev/null +++ b/libcxx/test/libcxx/experimental/utilities/optional/use_header_warning.fail.cpp @@ -0,0 +1,18 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// REQUIRES: verify-support + +// <experimental/optional> + +#include <experimental/optional> + +// expected-error@experimental/optional:* {{"<experimental/optional> has been removed. Use <optional> instead."}} + +int main() {} diff --git a/libcxx/test/libcxx/experimental/utilities/optional/version.pass.cpp b/libcxx/test/libcxx/experimental/utilities/optional/version.pass.cpp new file mode 100644 index 00000000000..ef011bbe450 --- /dev/null +++ b/libcxx/test/libcxx/experimental/utilities/optional/version.pass.cpp @@ -0,0 +1,21 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <experimental/optional> + +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-W#warnings" +#endif +#include <experimental/optional> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() {} diff --git a/libcxx/test/libcxx/experimental/utilities/ratio/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/utilities/ratio/use_header_warning.fail.cpp new file mode 100644 index 00000000000..d9a01337a93 --- /dev/null +++ b/libcxx/test/libcxx/experimental/utilities/ratio/use_header_warning.fail.cpp @@ -0,0 +1,18 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// REQUIRES: verify-support + +// <experimental/ratio> + +#include <experimental/ratio> + +// expected-error@experimental/ratio:* {{"<experimental/ratio> has been removed. Use <ratio> instead."}} + +int main() {} diff --git a/libcxx/test/libcxx/experimental/utilities/ratio/version.pass.cpp b/libcxx/test/libcxx/experimental/utilities/ratio/version.pass.cpp new file mode 100644 index 00000000000..8ebb347a44b --- /dev/null +++ b/libcxx/test/libcxx/experimental/utilities/ratio/version.pass.cpp @@ -0,0 +1,21 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <experimental/ratio> + +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-W#warnings" +#endif +#include <experimental/ratio> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() {} diff --git a/libcxx/test/libcxx/experimental/utilities/time/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/utilities/time/use_header_warning.fail.cpp new file mode 100644 index 00000000000..9f3d679fc2a --- /dev/null +++ b/libcxx/test/libcxx/experimental/utilities/time/use_header_warning.fail.cpp @@ -0,0 +1,18 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// REQUIRES: verify-support + +// <experimental/chrono> + +#include <experimental/chrono> + +// expected-error@experimental/chrono:* {{"<experimental/chrono> has been removed. Use <chrono> instead."}} + +int main() {} diff --git a/libcxx/test/libcxx/experimental/utilities/time/version.pass.cpp b/libcxx/test/libcxx/experimental/utilities/time/version.pass.cpp new file mode 100644 index 00000000000..5544a3f0e14 --- /dev/null +++ b/libcxx/test/libcxx/experimental/utilities/time/version.pass.cpp @@ -0,0 +1,21 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <experimental/chrono> + +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-W#warnings" +#endif +#include <experimental/chrono> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() {} diff --git a/libcxx/test/libcxx/experimental/utilities/tuple/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/utilities/tuple/use_header_warning.fail.cpp new file mode 100644 index 00000000000..520e9fbb42f --- /dev/null +++ b/libcxx/test/libcxx/experimental/utilities/tuple/use_header_warning.fail.cpp @@ -0,0 +1,18 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// REQUIRES: verify-support + +// <experimental/tuple> + +#include <experimental/tuple> + +// expected-error@experimental/tuple:* {{"<experimental/tuple> has been removed. Use <tuple> instead."}} + +int main() {} diff --git a/libcxx/test/libcxx/experimental/utilities/tuple/version.pass.cpp b/libcxx/test/libcxx/experimental/utilities/tuple/version.pass.cpp new file mode 100644 index 00000000000..c7c9e572856 --- /dev/null +++ b/libcxx/test/libcxx/experimental/utilities/tuple/version.pass.cpp @@ -0,0 +1,21 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <experimental/tuple> + +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-W#warnings" +#endif +#include <experimental/tuple> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() {} |