This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Improves feature-test macro diagnostics.
ClosedPublic

Authored by Mordante on Aug 20 2022, 6:19 AM.

Details

Reviewers
var-const
philnik
Group Reviewers
Restricted Project
Commits
rGa72f6b032c37: [libc++] Improves feature-test macro diagnostics.
Summary

This was mentioned in review D131326.

Diff Detail

Event Timeline

Mordante created this revision.Aug 20 2022, 6:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2022, 6:19 AM
Herald added a subscriber: arichardson. · View Herald Transcript
Mordante requested review of this revision.Aug 20 2022, 6:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2022, 6:19 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik accepted this revision.Aug 20 2022, 6:23 AM
This revision is now accepted and ready to land.Aug 20 2022, 6:23 AM
var-const accepted this revision.Aug 29 2022, 8:01 PM

Thanks for addressing this! I think this reads a lot better than the previous version. The double negation is still there, but it looks like it would require disproportional effort to get rid of that, and this looks like a very nice improvement.

libcxx/utils/generate_feature_test_macro_components.py
985

Optional: do you think surrounding the expanded text with some symbol (e.g. quotes or backticks) will make the resulting string easier to read? E.g. (note the quotes):

__cpp_lib_shared_mutex should not be defined when the requirement "!defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)" is not met!
Mordante marked an inline comment as done.Aug 30 2022, 8:55 AM

Thanks for the reviews!

libcxx/utils/generate_feature_test_macro_components.py
985

Good suggestion: I will use the single quote to avoid escapes in the generated message.

This revision was automatically updated to reflect the committed changes.
Mordante marked an inline comment as done.