[clang-tools-extra] c0abd38 - [clang-tidy] Remove 'const' qualifiers on return types that do nothing

Dmitri Gribenko via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 6 17:55:46 PDT 2023


Author: Dmitri Gribenko
Date: 2023-08-07T02:55:03+02:00
New Revision: c0abd3814564a568dfc607c216e6407eaa314f46

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

LOG: [clang-tidy] Remove 'const' qualifiers on return types that do nothing

Added: 
    

Modified: 
    clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
index dc3b0f70fb8add..c43d46b145a178 100644
--- a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
@@ -78,18 +78,18 @@ static const llvm::StringSet<> StdNames{
     "std::begin", "std::cbegin", "std::rbegin", "std::crbegin", "std::end",
     "std::cend",  "std::rend",   "std::crend",  "std::size"};
 
-static const StatementMatcher integerComparisonMatcher() {
+static StatementMatcher integerComparisonMatcher() {
   return expr(ignoringParenImpCasts(
       declRefExpr(to(varDecl(equalsBoundNode(InitVarName))))));
 }
 
-static const DeclarationMatcher initToZeroMatcher() {
+static DeclarationMatcher initToZeroMatcher() {
   return varDecl(
              hasInitializer(ignoringParenImpCasts(integerLiteral(equals(0)))))
       .bind(InitVarName);
 }
 
-static const StatementMatcher incrementVarMatcher() {
+static StatementMatcher incrementVarMatcher() {
   return declRefExpr(to(varDecl(equalsBoundNode(InitVarName))));
 }
 


        


More information about the cfe-commits mailing list