Skip to content

Commit

Permalink
clang-tidy: don't suggest c++20's reverse_view.
Browse files Browse the repository at this point in the history
Some platforms (e.g., ChromeOS) still opt into C++17 for the moment.
Until everything's on C++20, clang-tidy shouldn't be suggesting C++20
constructs.

Bug: 1402090, 1404958
Change-Id: I05751f753b3788073b53ea8582a1217139940660
Fixed: 1402090
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4134765
Commit-Queue: George Burgess <gbiv@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1088863}
  • Loading branch information
gburgessiv authored and Chromium LUCI CQ committed Jan 4, 2023
1 parent 28b8dcb commit 0897801
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,11 @@
# https://groups.google.com/a/chromium.org/g/cxx/c/noMMTNYiM0w .
- key: modernize-use-emplace.IgnoreImplicitConstructors
value: 1
# crbug.com/1402090: until we support C++20 everywhere, we shouldn't be
# suggesting constructs that require C++20. Prefer base::Reversed.
# TODO(crbug.com/1404958): remove these once C++20 is everywhere.
- key: modernize-loop-convert.MakeReverseRangeFunction
value: base::Reversed
- key: modernize-loop-convert.MakeReverseRangeHeader
value: base/containers/adapters.h
...

0 comments on commit 0897801

Please sign in to comment.