This is an archive of the discontinued LLVM Phabricator instance.

[libc++][ranges] Fixes as_rvalue's linkage.
ClosedPublic

Authored by Mordante on May 1 2023, 8:52 AM.

Details

Reviewers
philnik
Group Reviewers
Restricted Project
Commits
rGd5442761f944: [libc++][ranges] Fixes as_rvalue's linkage.
Summary

This was discovered while working on modules. They can't export
declarations with internal linkage.

Diff Detail

Event Timeline

Mordante created this revision.May 1 2023, 8:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 1 2023, 8:52 AM
Mordante requested review of this revision.May 1 2023, 8:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 1 2023, 8:52 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik accepted this revision.May 1 2023, 8:59 AM
philnik added a subscriber: philnik.

Maybe we could add a clang-tidy check to make sure all variables in the std::ranges::__cpo namespace are marked inline?

This revision is now accepted and ready to land.May 1 2023, 8:59 AM

Thanks for the review!

Maybe we could add a clang-tidy check to make sure all variables in the std::ranges::__cpo namespace are marked inline?

That would be an extremely narrow check. I don't think that's too useful, especially since several similar issues were found be module tests. This tests validates the declarations in the headers and compares them in the modules. This is a useful test by itself and catches this error too.

This revision was landed with ongoing or failed builds.May 2 2023, 8:55 AM
This revision was automatically updated to reflect the committed changes.