aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/ExprEngineC.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2013-02-07 23:29:22 +0000
committerAnna Zaks <ganna@apple.com>2013-02-07 23:29:22 +0000
commit8135886ab74d852a6702b1f5656a0b146abe210a (patch)
treedde403f8c9a1b46a713e1e4465fe03615d180385 /lib/StaticAnalyzer/Core/ExprEngineC.cpp
parent1c32b81765ed63ae9e3e00e5acef7a4379bba228 (diff)
[analyzer] Remove redundant check as per Jordan's feedback.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngineC.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/ExprEngineC.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/lib/StaticAnalyzer/Core/ExprEngineC.cpp
index a30d589d87..f33f56176d 100644
--- a/lib/StaticAnalyzer/Core/ExprEngineC.cpp
+++ b/lib/StaticAnalyzer/Core/ExprEngineC.cpp
@@ -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;