Skip to content

Commit c5b7dda

Browse files
committed
Remove unnecessary static_cast.
1 parent 2fc8017 commit c5b7dda

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ UnnecessaryValueParamCheck::UnnecessaryValueParamCheck(
5454
IsAllowedInCoroutines(Options.get("IsAllowedInCoroutines", false)) {}
5555

5656
void UnnecessaryValueParamCheck::registerMatchers(MatchFinder *Finder) {
57-
using StmtMatcher = ast_matchers::internal::BindableMatcher<Stmt>;
5857
const auto ExpensiveValueParamDecl = parmVarDecl(
5958
hasType(qualType(
6059
hasCanonicalType(matchers::isExpensiveToCopy()),
@@ -67,8 +66,7 @@ void UnnecessaryValueParamCheck::registerMatchers(MatchFinder *Finder) {
6766
TK_AsIs,
6867
functionDecl(hasBody(IsAllowedInCoroutines
6968
? stmt()
70-
: static_cast<StmtMatcher>(
71-
unless(coroutineBodyStmt()))),
69+
: stmt(unless(coroutineBodyStmt()))),
7270
isDefinition(), unless(isImplicit()),
7371
unless(cxxMethodDecl(anyOf(isOverride(), isFinal()))),
7472
has(typeLoc(forEach(ExpensiveValueParamDecl))),

0 commit comments

Comments
 (0)