[PATCH] D81923: [clang-tidy] Add modernize-use-ranges check.

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 16 06:04:09 PDT 2020


njames93 marked an inline comment as done.
njames93 added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/modernize/UseRangesCheck.cpp:77
+                  MatchCallTo((ID + "Begin").str(), namedDecl().bind(Range),
+                              hasAnyName("::std::begin", "::std::cbegin"),
+                              hasAnyName("begin", "cbegin"))),
----------------
JonasToth wrote:
> i would at `rbegin()` and the likes, too.
How should `rbegin` be handled
`std::<func>(std::rbegin(X), std::rbegin(X))` -> `std::ranges::<func>(std::ranges::reverse_view(X))` I almost think that looks less pleasing, but thats just my opinion.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81923/new/

https://reviews.llvm.org/D81923





More information about the cfe-commits mailing list