diff options
author | Michal Gorny <mgorny@gentoo.org> | 2018-12-16 09:18:31 +0000 |
---|---|---|
committer | Michal Gorny <mgorny@gentoo.org> | 2018-12-16 09:18:31 +0000 |
commit | 16b9decb93faed3671d020e2d096bad46db4f4dc (patch) | |
tree | 2e93561c6df9d69d00ec19e6be8be6c361d52f09 /libcxx/test/std/utilities | |
parent | a25cd0c2da6bbaf9e0c30efc102f2343b15d618e (diff) | |
download | bcm5719-llvm-16b9decb93faed3671d020e2d096bad46db4f4dc.tar.gz bcm5719-llvm-16b9decb93faed3671d020e2d096bad46db4f4dc.zip |
[test] [ctime] Ignore -Wformat-zero-length warnings
Explicitly disable the -Wformat-zero-length diagnostic when running
ctime tests, since one of the test cases passes zero-length format
string to strftime(). When strftime() is appropriately decorated
with __attribute__(format, ...), this caused the test to fail because
of this warning (e.g. on NetBSD).
Differential Revision: https://reviews.llvm.org/D55661
llvm-svn: 349294
Diffstat (limited to 'libcxx/test/std/utilities')
-rw-r--r-- | libcxx/test/std/utilities/time/date.time/ctime.pass.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp b/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp index cd1f32be2bc..f6dd75d2484 100644 --- a/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp +++ b/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp @@ -26,6 +26,10 @@ #endif #endif +#if defined(__GNUC__) +#pragma GCC diagnostic ignored "-Wformat-zero-length" +#endif + int main() { std::clock_t c = 0; |