Author: Da-Viper Date: 2023-12-25T19:59:08+01:00 New Revision: 8c24422cd4a5ec458950e135f62d9b14a96e75cc
URL: https://github.com/llvm/llvm-project/commit/8c24422cd4a5ec458950e135f62d9b14a96e75cc DIFF: https://github.com/llvm/llvm-project/commit/8c24422cd4a5ec458950e135f62d9b14a96e75cc.diff LOG: [clang-tidy] add std::span to the default types. (#76116) Change default configuration of readability-simplify-subscript-expr to include std::span. Fixes #75687 Added: Modified: clang-tools-extra/clang-tidy/readability/SimplifySubscriptExprCheck.cpp clang-tools-extra/docs/clang-tidy/checks/readability/simplify-subscript-expr.rst Removed: ################################################################################ diff --git a/clang-tools-extra/clang-tidy/readability/SimplifySubscriptExprCheck.cpp b/clang-tools-extra/clang-tidy/readability/SimplifySubscriptExprCheck.cpp index d274abcbfabe8a..7d4698d27ed160 100644 --- a/clang-tools-extra/clang-tidy/readability/SimplifySubscriptExprCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/SimplifySubscriptExprCheck.cpp @@ -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) diff --git a/clang-tools-extra/docs/clang-tidy/checks/readability/simplify-subscript-expr.rst b/clang-tools-extra/docs/clang-tidy/checks/readability/simplify-subscript-expr.rst index f3f44bedcf74c5..4b7d7f2ddcf417 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/readability/simplify-subscript-expr.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/readability/simplify-subscript-expr.rst @@ -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` _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits