Skip to content

Commit 8c24422

Browse files
authored
[clang-tidy] add std::span to the default types. (#76116)
Change default configuration of readability-simplify-subscript-expr to include std::span. Fixes #75687
1 parent c67e2d9 commit 8c24422

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

clang-tools-extra/clang-tidy/readability/SimplifySubscriptExprCheck.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ using namespace clang::ast_matchers;
1616
namespace clang::tidy::readability {
1717

1818
static const char KDefaultTypes[] =
19-
"::std::basic_string;::std::basic_string_view;::std::vector;::std::array";
19+
"::std::basic_string;::std::basic_string_view;::std::vector;::std::array;::"
20+
"std::span";
2021

2122
SimplifySubscriptExprCheck::SimplifySubscriptExprCheck(
2223
StringRef Name, ClangTidyContext *Context)

clang-tools-extra/docs/clang-tidy/checks/readability/simplify-subscript-expr.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ Options
2020
.. option:: Types
2121

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

0 commit comments

Comments
 (0)