This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Make feature-test macros consistent with availability macros
ClosedPublic

Authored by ldionne on Jan 19 2021, 10:24 AM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Commits
rG76fc35752d19: [libc++] Make feature-test macros consistent with availability macros
Summary

Before this patch, feature-test macros didn't take special availability
markup into account, which means that feature-test macros can sometimes
appear to "lie". For example, if you compile in C++20 mode and target
macOS 10.13, the __cpp_lib_filesystem feature-test macro will be provided
even though the <filesystem> declarations are marked as unavailable.
This patch fixes that.

rdar://68142369

Diff Detail

Event Timeline

ldionne created this revision.Jan 19 2021, 10:24 AM
ldionne requested review of this revision.Jan 19 2021, 10:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 19 2021, 10:24 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne updated this revision to Diff 317620.Jan 19 2021, 10:25 AM

Fix typo.

Note that I expect to have to make changes to the tests. I'm submitting a patch mainly to run the CI.

ldionne updated this revision to Diff 317621.Jan 19 2021, 10:26 AM

Re-generate feature-test macros after fixing the typo.

ldionne updated this revision to Diff 321182.Feb 3 2021, 12:02 PM

Rebase onto main and try to fix failing tests.

ldionne accepted this revision as: Restricted Project.Feb 4 2021, 8:40 AM
This revision was not accepted when it landed; it landed in state Needs Review.Feb 4 2021, 8:40 AM
This revision was automatically updated to reflect the committed changes.
libcxx/include/version