This is an archive of the discontinued LLVM Phabricator instance.

Create infrastructure for defining and testing feature test macros
ClosedPublic

Authored by mclow.lists on Sep 11 2018, 3:31 PM.

Details

Reviewers
ldionne
EricWF
jfb
Summary

In P0941, the committee standardized a bunch of feature test macros.
[ I think it's a bad idea, but whatever. ]

This patch puts the existing libc++ feature test macros in <version>, where P0941 specifies, and makes sure that all the correct headers include <version>. It also introduces a full set of tests, one per header file that might get something defined.

At the moment, most of those tests are empty, since libc++ does not define many feature test macros.
But now it's easy to add more. Put them in <version> and update the appropriate tests. Helpfully, the list is at the top of each of the test files.

Diff Detail

Event Timeline

mclow.lists created this revision.Sep 11 2018, 3:31 PM
mclow.lists edited the summary of this revision. (Show Details)Sep 11 2018, 3:32 PM
ldionne accepted this revision.Sep 12 2018, 10:02 AM

Thanks! I don't like feature test macros either, but we should still strive for conformance.

This revision is now accepted and ready to land.Sep 12 2018, 10:02 AM
mclow.lists closed this revision.Sep 12 2018, 12:43 PM

landed as revision 342073