Skip to content

Commit

Permalink
[clang-tidy] add std::span to the default types. (#76116)
Browse files Browse the repository at this point in the history
Change default configuration of readability-simplify-subscript-expr to include std::span.
Fixes #75687
  • Loading branch information
Da-Viper committed Dec 25, 2023
1 parent c67e2d9 commit 8c24422
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ using namespace clang::ast_matchers;
namespace clang::tidy::readability {

static const char KDefaultTypes[] =
"::std::basic_string;::std::basic_string_view;::std::vector;::std::array";
"::std::basic_string;::std::basic_string_view;::std::vector;::std::array;::"
"std::span";

SimplifySubscriptExprCheck::SimplifySubscriptExprCheck(
StringRef Name, ClangTidyContext *Context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Options
.. option:: Types

The list of type(s) that triggers this check. Default is
`::std::basic_string;::std::basic_string_view;::std::vector;::std::array`
`::std::basic_string;::std::basic_string_view;::std::vector;::std::array;::std::span`

0 comments on commit 8c24422

Please sign in to comment.