AvoidBindCheck.cpp: Fix unused variables warning
authorHans Wennborg <hans@chromium.org>
Tue, 3 Dec 2019 07:59:01 +0000 (08:59 +0100)
committerHans Wennborg <hans@chromium.org>
Tue, 3 Dec 2019 07:59:01 +0000 (08:59 +0100)
clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.cpp

index 06e459b..c9313db 100644 (file)
@@ -473,9 +473,9 @@ getCallableMaterialization(const MatchFinder::MatchResult &Result) {
     return CMK_Function;
 
   if (const auto *DRE = dyn_cast<DeclRefExpr>(NoTemporaries)) {
-    if (const auto *FD = dyn_cast<FunctionDecl>(DRE->getDecl()))
+    if (isa<FunctionDecl>(DRE->getDecl()))
       return CMK_Function;
-    if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()))
+    if (isa<VarDecl>(DRE->getDecl()))
       return CMK_VariableRef;
   }