[analyzer] Remove redundant check as per Jordan's feedback.
authorAnna Zaks <ganna@apple.com>
Thu, 7 Feb 2013 23:29:22 +0000 (23:29 +0000)
committerAnna Zaks <ganna@apple.com>
Thu, 7 Feb 2013 23:29:22 +0000 (23:29 +0000)
llvm-svn: 174680

clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp

index a30d589..f33f561 100644 (file)
@@ -431,10 +431,9 @@ REGISTER_TRAIT_WITH_PROGRAMSTATE(InitializedGlobalsSet,
 void ExprEngine::VisitDeclStmt(const DeclStmt *DS, ExplodedNode *Pred,
                                ExplodedNodeSet &Dst) {
   // Assumption: The CFG has one DeclStmt per Decl.
-  const Decl *D = *DS->decl_begin();
-  const VarDecl *VD = dyn_cast_or_null<VarDecl>(D);
+  const VarDecl *VD = dyn_cast_or_null<VarDecl>(*DS->decl_begin());
 
-  if (!D || !VD) {
+  if (!VD) {
     //TODO:AZ: remove explicit insertion after refactoring is done.
     Dst.insert(Pred);
     return;