summaryrefslogtreecommitdiffstats
path: root/clang/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
commit907e126be217de65cd3a0f685a05a99bf91d6e91 (patch)
tree2465b73f80cd8281aa5afa789ce36403831c514e /clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
parent297176c393f290d3f6942e5f772d3e33b767448a (diff)
downloadbcm5719-llvm-907e126be217de65cd3a0f685a05a99bf91d6e91.tar.gz
bcm5719-llvm-907e126be217de65cd3a0f685a05a99bf91d6e91.zip
[analyzer] Remove redundant check as per Jordan's feedback.
llvm-svn: 174680
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
index a30d589d87f..f33f56176d3 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud