[libcxx] r248989 - Manually suppress -Wnonnull when it occurs in an unevaluated context

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 1 00:41:08 PDT 2015


Author: ericwf
Date: Thu Oct  1 02:41:07 2015
New Revision: 248989

URL: http://llvm.org/viewvc/llvm-project?rev=248989&view=rev
Log:
Manually suppress -Wnonnull when it occurs in an unevaluated context

Modified:
    libcxx/trunk/test/std/depr/depr.c.headers/stdlib_h.pass.cpp
    libcxx/trunk/test/std/language.support/support.runtime/cstdlib.pass.cpp

Modified: libcxx/trunk/test/std/depr/depr.c.headers/stdlib_h.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/depr/depr.c.headers/stdlib_h.pass.cpp?rev=248989&r1=248988&r2=248989&view=diff
==============================================================================
--- libcxx/trunk/test/std/depr/depr.c.headers/stdlib_h.pass.cpp (original)
+++ libcxx/trunk/test/std/depr/depr.c.headers/stdlib_h.pass.cpp Thu Oct  1 02:41:07 2015
@@ -12,6 +12,12 @@
 #include <stdlib.h>
 #include <type_traits>
 
+// As of 1/10/2015 clang emits a -Wnonnull warnings even if the warning occurs
+// in an unevaluated context. For this reason we manually suppress the warning.
+#if defined(__clang__)
+#pragma clang diagnostic ignored "-Wnonnull"
+#endif
+
 #ifndef EXIT_FAILURE
 #error EXIT_FAILURE not defined
 #endif

Modified: libcxx/trunk/test/std/language.support/support.runtime/cstdlib.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.runtime/cstdlib.pass.cpp?rev=248989&r1=248988&r2=248989&view=diff
==============================================================================
--- libcxx/trunk/test/std/language.support/support.runtime/cstdlib.pass.cpp (original)
+++ libcxx/trunk/test/std/language.support/support.runtime/cstdlib.pass.cpp Thu Oct  1 02:41:07 2015
@@ -13,6 +13,12 @@
 #include <type_traits>
 #include <cassert>
 
+// As of 1/10/2015 clang emits a -Wnonnull warnings even if the warning occurs
+// in an unevaluated context. For this reason we manually suppress the warning.
+#if defined(__clang__)
+#pragma clang diagnostic ignored "-Wnonnull"
+#endif
+
 #ifndef EXIT_FAILURE
 #error EXIT_FAILURE not defined
 #endif




More information about the cfe-commits mailing list