Skip to content

Commit

Permalink
enabled modernize-avoid-c-arrays clang-tidy check with `AllowString…
Browse files Browse the repository at this point in the history
…Arrays` set to `true`
  • Loading branch information
firewave committed Feb 4, 2024
1 parent 4ec0036 commit 86bf756
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ Checks: >
-misc-non-private-member-variables-in-classes,
-misc-throw-by-value-catch-by-reference,
-misc-use-anonymous-namespace,
-modernize-avoid-c-arrays,
-modernize-deprecated-ios-base-aliases,
-misc-include-cleaner,
-misc-unused-using-decls,
Expand Down Expand Up @@ -77,3 +76,5 @@ CheckOptions:
value: '1'
- key: readability-simplify-boolean-expr.SimplifyDeMorgan
value: '0'
- key: modernize-avoid-c-arrays.AllowStringArrays
value: true
2 changes: 1 addition & 1 deletion clang-tidy.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Produces warnings which might be considered false positives starting with C++11

`modernize-avoid-c-arrays`<br/>

Produces warnings when `const char[]` is being used which is quite common in our code. Does not make sense to enable before C++17 when `std::string_view` becomes available.
Does not make sense to enable before C++17 when `std::string_view` becomes available.
Also reports a false positive about templates which deduce the array length: https://github.com/llvm/llvm-project/issues/60053.

`misc-include-cleaner`<br/>
Expand Down

0 comments on commit 86bf756

Please sign in to comment.