This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] [ctime] Ignore -Wformat-zero-length warnings
ClosedPublic

Authored by mgorny on Dec 13 2018, 9:38 AM.

Details

Summary

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).

Diff Detail

Repository
rL LLVM

Event Timeline

mgorny created this revision.Dec 13 2018, 9:38 AM

Jut asking, do you intend to cover GCC and Clang with this check?

Jut asking, do you intend to cover GCC and Clang with this check?

Yes, I've tested it and it makes the test pass on both.

krytarowski accepted this revision.Dec 13 2018, 12:07 PM
This revision is now accepted and ready to land.Dec 13 2018, 12:07 PM
This revision was automatically updated to reflect the committed changes.