[libcxx-commits] [PATCH] D118874: [libc++][nfc] Use TEST_SAFE_STATIC.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 3 09:01:32 PST 2022
Mordante updated this revision to Diff 405673.
Mordante marked an inline comment as done.
Mordante added a comment.
Addresses review comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118874/new/
https://reviews.llvm.org/D118874
Files:
libcxx/test/std/utilities/any/any.class/any.cons/default.pass.cpp
libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/default.pass.cpp
libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/nullptr.pass.cpp
Index: libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/nullptr.pass.cpp
===================================================================
--- libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/nullptr.pass.cpp
+++ libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/nullptr.pass.cpp
@@ -19,13 +19,10 @@
#include "unique_ptr_test_helper.h"
-#if defined(_LIBCPP_VERSION) && TEST_STD_VER >= 11
-_LIBCPP_SAFE_STATIC std::unique_ptr<int> global_static_unique_ptr_single(nullptr);
-_LIBCPP_SAFE_STATIC std::unique_ptr<int[]> global_static_unique_ptr_runtime(nullptr);
-#endif
-
-
#if TEST_STD_VER >= 11
+TEST_SAFE_STATIC std::unique_ptr<int> global_static_unique_ptr_single(nullptr);
+TEST_SAFE_STATIC std::unique_ptr<int[]> global_static_unique_ptr_runtime(nullptr);
+
struct NonDefaultDeleter {
NonDefaultDeleter() = delete;
void operator()(void*) const {}
Index: libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/default.pass.cpp
===================================================================
--- libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/default.pass.cpp
+++ libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/default.pass.cpp
@@ -30,12 +30,10 @@
#include "deleter_types.h"
#include "unique_ptr_test_helper.h"
-#if defined(_LIBCPP_VERSION) && TEST_STD_VER >= 11
-_LIBCPP_SAFE_STATIC std::unique_ptr<int> global_static_unique_ptr_single;
-_LIBCPP_SAFE_STATIC std::unique_ptr<int[]> global_static_unique_ptr_runtime;
-#endif
-
#if TEST_STD_VER >= 11
+TEST_SAFE_STATIC std::unique_ptr<int> global_static_unique_ptr_single;
+TEST_SAFE_STATIC std::unique_ptr<int[]> global_static_unique_ptr_runtime;
+
struct NonDefaultDeleter {
NonDefaultDeleter() = delete;
void operator()(void*) const {}
Index: libcxx/test/std/utilities/any/any.class/any.cons/default.pass.cpp
===================================================================
--- libcxx/test/std/utilities/any/any.class/any.cons/default.pass.cpp
+++ libcxx/test/std/utilities/any/any.class/any.cons/default.pass.cpp
@@ -33,10 +33,8 @@
struct TestConstexpr : public std::any {
constexpr TestConstexpr() : std::any() {}
};
-#ifdef _LIBCPP_SAFE_STATIC
- _LIBCPP_SAFE_STATIC static std::any a;
+ TEST_SAFE_STATIC static std::any a;
((void)a);
-#endif
}
{
DisableAllocationGuard g; ((void)g);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118874.405673.patch
Type: text/x-patch
Size: 2520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220203/6df810a7/attachment.bin>
More information about the libcxx-commits
mailing list