From 9698ac5a68ae94d3e89c77673fb8f8e51611d06d Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Thu, 1 Oct 2015 07:41:07 +0000 Subject: [PATCH] Manually suppress -Wnonnull when it occurs in an unevaluated context git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@248989 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/std/depr/depr.c.headers/stdlib_h.pass.cpp | 6 ++++++ test/std/language.support/support.runtime/cstdlib.pass.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/test/std/depr/depr.c.headers/stdlib_h.pass.cpp b/test/std/depr/depr.c.headers/stdlib_h.pass.cpp index d1cc4431b..046ec94f7 100644 --- a/test/std/depr/depr.c.headers/stdlib_h.pass.cpp +++ b/test/std/depr/depr.c.headers/stdlib_h.pass.cpp @@ -12,6 +12,12 @@ #include #include +// 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 diff --git a/test/std/language.support/support.runtime/cstdlib.pass.cpp b/test/std/language.support/support.runtime/cstdlib.pass.cpp index 8191350b5..d8f88cf58 100644 --- a/test/std/language.support/support.runtime/cstdlib.pass.cpp +++ b/test/std/language.support/support.runtime/cstdlib.pass.cpp @@ -13,6 +13,12 @@ #include #include +// 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