Skip to content

Commit

Permalink
clang-tidy: Disable readability-container-data-pointer (#1047)
Browse files Browse the repository at this point in the history
It may be intentional to do `&v[0]` instead of `v.data()` as a way of
saying "give me the address of the 0th element" instead of "give me the
address of the array of elements".

An example: #1046.
  • Loading branch information
chfast authored Oct 9, 2024
1 parent 8399303 commit 400f137
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ Checks:
- "portability-*"
- "readability-*"
- "-readability-braces-around-statements"
# Sometimes we actually want to take the address of the first element.
- "-readability-container-data-pointer"
- "-readability-else-after-return"
- "-readability-function-cognitive-complexity"
- "-readability-function-size"
Expand Down

0 comments on commit 400f137

Please sign in to comment.