[clang-tidy] add std::span to the default types. (#76116)

Change default configuration of readability-simplify-subscript-expr to include std::span.
Fixes #75687
This commit is contained in:
Da-Viper 2023-12-25 18:59:08 +00:00 committed by GitHub
parent c67e2d97ad
commit 8c24422cd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -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)

View File

@ -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`