r174680 - [analyzer] Remove redundant check as per Jordan's feedback.
Anna Zaks
ganna at apple.com
Thu Feb 7 15:29:23 PST 2013
Author: zaks
Date: Thu Feb 7 17:29:22 2013
New Revision: 174680
URL: http://llvm.org/viewvc/llvm-project?rev=174680&view=rev
Log:
[analyzer] Remove redundant check as per Jordan's feedback.
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp?rev=174680&r1=174679&r2=174680&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp Thu Feb 7 17:29:22 2013
@@ -431,10 +431,9 @@ REGISTER_TRAIT_WITH_PROGRAMSTATE(Initial
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;
More information about the cfe-commits
mailing list