[PATCH] D33741: [libc++] Undef min/max in test_macros.h

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 31 15:56:51 PDT 2017


EricWF created this revision.

After changing libc++ to push/pop the min/max macros on Windows we have a bunch of new test  failures, caused by tests using min/max. I would like to use test_macros.h to undefine it.

Would this work for you? How have you been dealing with these failures?


https://reviews.llvm.org/D33741

Files:
  test/support/test_macros.h


Index: test/support/test_macros.h
===================================================================
--- test/support/test_macros.h
+++ test/support/test_macros.h
@@ -223,6 +223,14 @@
 }
 #endif
 
+#if defined(min)
+#undef min
+#endif
+
+#if defined(max)
+#undef max
+#endif
+
 #if defined(__GNUC__)
 #pragma GCC diagnostic pop
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33741.100931.patch
Type: text/x-patch
Size: 337 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170531/07e4717a/attachment.bin>


More information about the cfe-commits mailing list