Skip to content

Use std::ranges::reverse_view and enable clang-tidy reverse ranges#55755

Open
NickGerleman wants to merge 1 commit intofacebook:mainfrom
NickGerleman:export-D75834622
Open

Use std::ranges::reverse_view and enable clang-tidy reverse ranges#55755
NickGerleman wants to merge 1 commit intofacebook:mainfrom
NickGerleman:export-D75834622

Conversation

@NickGerleman
Copy link
Contributor

Summary:
Previously, the RN build in fbcode was using an old platform version with poor support for std::ranges, so we had disabled clang-tidy's modernize-loop-convert.UseCxx20ReverseRanges check. This is no longer the case, so we can remove the suppression and replace instances of reverse iteration using rbegin/rend iterators with std::ranges::reverse_view.

Changelog: [Internal]

Differential Revision: D75834622

Summary:
Previously, the RN build in fbcode was using an old platform version with poor support for std::ranges, so we had disabled clang-tidy's `modernize-loop-convert.UseCxx20ReverseRanges` check. This is no longer the case, so we can remove the suppression and replace instances of reverse iteration using rbegin/rend iterators with `std::ranges::reverse_view`.

Changelog: [Internal]

Differential Revision: D75834622
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 25, 2026
@meta-codesync
Copy link

meta-codesync bot commented Feb 25, 2026

@NickGerleman has exported this pull request. If you are a Meta employee, you can view the originating Diff in D75834622.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants