]> granicus.if.org Git - clang/commitdiff
Fix -Wunused-variable warnings after r330377.
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Fri, 20 Apr 2018 09:47:03 +0000 (09:47 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Fri, 20 Apr 2018 09:47:03 +0000 (09:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@330408 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ConstructionContext.cpp

index 8656a1bbe0911fc3d9c1ee05c4f6aa3e93c2ce2a..9db6f214beed6281553c6f0e82e26e4546faa42b 100644 (file)
@@ -80,7 +80,7 @@ const ConstructionContext *ConstructionContext::createFromLayers(
           return create<TemporaryObjectConstructionContext>(C, BTE, MTE);
         }
         // This is a constructor into a function argument. Not implemented yet.
-        if (auto *CE = dyn_cast<CallExpr>(ParentLayer->getTriggerStmt()))
+        if (isa<CallExpr>(ParentLayer->getTriggerStmt()))
           return nullptr;
         // This is C++17 copy-elided construction into return statement.
         if (auto *RS = dyn_cast<ReturnStmt>(ParentLayer->getTriggerStmt())) {
@@ -118,7 +118,7 @@ const ConstructionContext *ConstructionContext::createFromLayers(
       return create<SimpleReturnedValueConstructionContext>(C, RS);
     }
     // This is a constructor into a function argument. Not implemented yet.
-    if (auto *CE = dyn_cast<CallExpr>(TopLayer->getTriggerStmt()))
+    if (isa<CallExpr>(TopLayer->getTriggerStmt()))
       return nullptr;
     llvm_unreachable("Unexpected construction context with statement!");
   } else if (const CXXCtorInitializer *I = TopLayer->getTriggerInit()) {