This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Update generate_feature_test_macro_components.py to match SD-6
ClosedPublic

Authored by Quuxplusone on Dec 26 2020, 7:24 PM.

Details

Summary

It's still a little confusing because in many cases C++17 and C++20 have different values, and libc++ implements the C++17 behavior but not the C++20 behavior; 'unimplemented' can't represent that scenario.

Ultimately we probably ought to completely redesign the script to be in terms of paper numbers, rather than language revisions, and make it generate the CSV files like "Cxx2aStatusPaperStatus.csv" as well.

Most newly added macros are unimplemented. I've marked a few as implemented, though, based on my reading of the code; for example I was pretty sure __cpp_lib_latch is implemented since we have <latch>.

Diff Detail

Event Timeline

Quuxplusone requested review of this revision.Dec 26 2020, 7:24 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptDec 26 2020, 7:24 PM

You should add ["UNSUPPORTED: libcpp-has-no-threads"] to barrier, latch and semaphore.

Add ["UNSUPPORTED: libcpp-has-no-threads"] to barrier, latch and semaphore.

Quuxplusone edited the summary of this revision. (Show Details)

Rebased on main after D93383.

ldionne requested changes to this revision.Jan 7 2021, 8:22 AM

Thanks a lot for the cleanup. However, since this touches the script in a major way, can we please avoid mixing the formatting changes and the actual changes? I would be more comfortable with this change if we started by changing " to ' + sorted the macros without changing anything else, and then actually made the changes in this patch. That way, we'd be able to review the changes in generate_feature_test_maro_components.py. WDYT?

This revision now requires changes to proceed.Jan 7 2021, 8:22 AM
Quuxplusone edited the summary of this revision. (Show Details)

Push the alphabetization part (thanks @ldionne!), and rebase.

Thanks a lot, that's a great cleanup. Just a minor question but otherwise this LGTM.

libcxx/utils/generate_feature_test_macro_components.py
179–180

That doesn't exist anymore?

ldionne requested changes to this revision.Jan 8 2021, 7:22 AM

Well, contingent on fixing the single-threaded CI of course :-). I think you're only missing some UNSUPPORTED annotations.

This revision now requires changes to proceed.Jan 8 2021, 7:22 AM
Quuxplusone added inline comments.Jan 8 2021, 7:33 AM
libcxx/utils/generate_feature_test_macro_components.py
179–180

Right. The backstory here is gleaned from
https://cplusplus.github.io/LWG/issue3256 (change the name, adopted)
https://lists.isocpp.org/sg10/2019/11/0675.php (drop the "s" from "algorithms", apparently not adopted?)

Quuxplusone updated this revision to Diff 315397.EditedJan 8 2021, 7:37 AM

Whoops, my rebasing lost the UNSUPPORTED entries for barrier/latch/semaphore (i.e. @curdeius' earlier review comment). Restored.

ldionne accepted this revision.Jan 8 2021, 7:58 AM

LGTM once CI passes. Thanks a lot!

This revision is now accepted and ready to land.Jan 8 2021, 7:58 AM
This revision was landed with ongoing or failed builds.Jan 8 2021, 8:45 AM
This revision was automatically updated to reflect the committed changes.