Skip to content

Commit

Permalink
[clang-tidy] Remove 'const' qualifiers on return types that do nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
gribozavr committed Aug 7, 2023
1 parent ef888bc commit c0abd38
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))));
}

Expand Down

0 comments on commit c0abd38

Please sign in to comment.