[clang-tools-extra] 9fba1d5 - [clang-tidy] Fixes for bugprone-unused-local-non-trivial-variable

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 25 05:15:28 PST 2023


Author: Piotr Zegar
Date: 2023-12-25T13:09:12Z
New Revision: 9fba1d5f3a52af0ae62f386d0c494bd9510fa845

URL: https://github.com/llvm/llvm-project/commit/9fba1d5f3a52af0ae62f386d0c494bd9510fa845
DIFF: https://github.com/llvm/llvm-project/commit/9fba1d5f3a52af0ae62f386d0c494bd9510fa845.diff

LOG: [clang-tidy] Fixes for bugprone-unused-local-non-trivial-variable

Fixed spelling of some classes in code and in documentation.
Fixes for #76101

Added: 
    

Modified: 
    clang-tools-extra/clang-tidy/bugprone/UnusedLocalNonTrivialVariableCheck.cpp
    clang-tools-extra/docs/clang-tidy/checks/bugprone/unused-local-non-trivial-variable.rst

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-tidy/bugprone/UnusedLocalNonTrivialVariableCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/UnusedLocalNonTrivialVariableCheck.cpp
index ee7f365320ff9c..1b763d291082b6 100644
--- a/clang-tools-extra/clang-tidy/bugprone/UnusedLocalNonTrivialVariableCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/UnusedLocalNonTrivialVariableCheck.cpp
@@ -24,7 +24,7 @@ namespace clang::tidy::bugprone {
 namespace {
 static constexpr StringRef DefaultIncludeTypeRegex =
     "::std::.*mutex;::std::future;::std::basic_string;::std::basic_regex;"
-    "::std::base_istringstream;::std::base_stringstream;::std::bitset;"
+    "::std::basic_istringstream;::std::basic_stringstream;::std::bitset;"
     "::std::filesystem::path";
 
 AST_MATCHER(VarDecl, isLocalVarDecl) { return Node.isLocalVarDecl(); }

diff  --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone/unused-local-non-trivial-variable.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone/unused-local-non-trivial-variable.rst
index 7a72a08d8f3aa8..7531f19f3ebc15 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/bugprone/unused-local-non-trivial-variable.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone/unused-local-non-trivial-variable.rst
@@ -38,19 +38,18 @@ Options
 .. option:: IncludeTypes
 
    Semicolon-separated list of regular expressions matching types of variables
-   to check. 
-   By default the following types are checked: 
+   to check. By default the following types are checked:
 
    * `::std::.*mutex`
    * `::std::future`
-   * `::std::string`
+   * `::std::basic_string`
    * `::std::basic_regex`
    * `::std::basic_istringstream`
    * `::std::basic_stringstream`
    * `::std::bitset`
-   * `::std::path`
+   * `::std::filesystem::path`
 
 .. option:: ExcludeTypes
 
-   A semicolon-separated list of regular expressions matching types that are 
+   A semicolon-separated list of regular expressions matching types that are
    excluded from the `IncludeTypes` matches. By default it is an empty list.


        


More information about the cfe-commits mailing list