[libcxx] r292177 - Rename new_handler in tests to avoid conflicts with MSVC symbols.
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 16 16:32:08 PST 2017
Author: ericwf
Date: Mon Jan 16 18:32:08 2017
New Revision: 292177
URL: http://llvm.org/viewvc/llvm-project?rev=292177&view=rev
Log:
Rename new_handler in tests to avoid conflicts with MSVC symbols.
On Windows the header new.h defines "new_handler" in the global
namespace.
Modified:
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow.pass.cpp
Modified: libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp?rev=292177&r1=292176&r2=292177&view=diff
==============================================================================
--- libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp (original)
+++ libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp Mon Jan 16 18:32:08 2017
@@ -29,7 +29,7 @@ constexpr auto OverAligned = alignof(std
int new_handler_called = 0;
-void new_handler()
+void my_new_handler()
{
++new_handler_called;
std::set_new_handler(0);
@@ -44,7 +44,7 @@ struct alignas(OverAligned) A
};
void test_max_alloc() {
- std::set_new_handler(new_handler);
+ std::set_new_handler(my_new_handler);
auto do_test = []() {
void* vp = operator new [](std::numeric_limits<std::size_t>::max(),
std::align_val_t(OverAligned),
Modified: libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp?rev=292177&r1=292176&r2=292177&view=diff
==============================================================================
--- libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp (original)
+++ libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp Mon Jan 16 18:32:08 2017
@@ -21,7 +21,7 @@
int new_handler_called = 0;
-void new_handler()
+void my_new_handler()
{
++new_handler_called;
std::set_new_handler(0);
@@ -38,7 +38,7 @@ struct A
int main()
{
#ifndef TEST_HAS_NO_EXCEPTIONS
- std::set_new_handler(new_handler);
+ std::set_new_handler(my_new_handler);
try
{
void* volatile vp = operator new[] (std::numeric_limits<std::size_t>::max());
Modified: libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp?rev=292177&r1=292176&r2=292177&view=diff
==============================================================================
--- libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp (original)
+++ libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp Mon Jan 16 18:32:08 2017
@@ -21,7 +21,7 @@
int new_handler_called = 0;
-void new_handler()
+void my_new_handler()
{
++new_handler_called;
std::set_new_handler(0);
@@ -37,7 +37,7 @@ struct A
int main()
{
- std::set_new_handler(new_handler);
+ std::set_new_handler(my_new_handler);
#ifndef TEST_HAS_NO_EXCEPTIONS
try
#endif
Modified: libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp?rev=292177&r1=292176&r2=292177&view=diff
==============================================================================
--- libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp (original)
+++ libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp Mon Jan 16 18:32:08 2017
@@ -21,7 +21,7 @@
int new_handler_called = 0;
-void new_handler()
+void my_new_handler()
{
++new_handler_called;
std::set_new_handler(0);
@@ -38,7 +38,7 @@ struct A
int main()
{
#ifndef TEST_HAS_NO_EXCEPTIONS
- std::set_new_handler(new_handler);
+ std::set_new_handler(my_new_handler);
try
{
void* vp = operator new (std::numeric_limits<std::size_t>::max());
Modified: libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp?rev=292177&r1=292176&r2=292177&view=diff
==============================================================================
--- libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp (original)
+++ libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp Mon Jan 16 18:32:08 2017
@@ -29,7 +29,7 @@ constexpr auto OverAligned = alignof(std
int new_handler_called = 0;
-void new_handler()
+void my_new_handler()
{
++new_handler_called;
std::set_new_handler(0);
@@ -45,7 +45,7 @@ struct alignas(OverAligned) A
void test_throw_max_size() {
#ifndef TEST_HAS_NO_EXCEPTIONS
- std::set_new_handler(new_handler);
+ std::set_new_handler(my_new_handler);
try
{
void* vp = operator new (std::numeric_limits<std::size_t>::max(),
Modified: libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp?rev=292177&r1=292176&r2=292177&view=diff
==============================================================================
--- libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp (original)
+++ libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp Mon Jan 16 18:32:08 2017
@@ -29,7 +29,7 @@ constexpr auto OverAligned = alignof(std
int new_handler_called = 0;
-void new_handler()
+void my_new_handler()
{
++new_handler_called;
std::set_new_handler(0);
@@ -44,7 +44,7 @@ struct alignas(OverAligned) A
};
void test_max_alloc() {
- std::set_new_handler(new_handler);
+ std::set_new_handler(my_new_handler);
auto do_test = []() {
void* vp = operator new (std::numeric_limits<std::size_t>::max(),
std::align_val_t(OverAligned),
Modified: libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow.pass.cpp?rev=292177&r1=292176&r2=292177&view=diff
==============================================================================
--- libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow.pass.cpp (original)
+++ libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow.pass.cpp Mon Jan 16 18:32:08 2017
@@ -21,7 +21,7 @@
int new_handler_called = 0;
-void new_handler()
+void my_new_handler()
{
++new_handler_called;
std::set_new_handler(0);
@@ -37,7 +37,7 @@ struct A
int main()
{
- std::set_new_handler(new_handler);
+ std::set_new_handler(my_new_handler);
#ifndef TEST_HAS_NO_EXCEPTIONS
try
#endif
More information about the cfe-commits
mailing list