aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRExprEngine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-06-17 18:05:57 +0000
committerChris Lattner <sabre@nondot.org>2008-06-17 18:05:57 +0000
commit4111024be81e7c0525e42dadcc126d27e5bf2425 (patch)
treee29124f0d892b86e0c4a155f0366c82117dbedaa /lib/Analysis/GRExprEngine.cpp
parente5d12e8003acab516a58a01f71aae012458a4572 (diff)
Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl.
Patch by David Chisnall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52422 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r--lib/Analysis/GRExprEngine.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index ce64875797..837d910091 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -144,12 +144,18 @@ ValueState* GRExprEngine::getInitialState() {
for (LVDataTy::decl_iterator I=D.begin_decl(), E=D.end_decl(); I != E; ++I) {
- VarDecl* VD = cast<VarDecl>(const_cast<ScopedDecl*>(I->first));
-
- if (VD->hasGlobalStorage() || isa<ParmVarDecl>(VD)) {
- RVal X = RVal::GetSymbolValue(SymMgr, VD);
- StateMgr.BindVar(StateImpl, VD, X);
+ ScopedDecl *SD = const_cast<ScopedDecl*>(I->first);
+ if (VarDecl* VD = dyn_cast<VarDecl>(SD)) {
+ if (VD->hasGlobalStorage() || isa<ParmVarDecl>(VD)) {
+ RVal X = RVal::GetSymbolValue(SymMgr, VD);
+ StateMgr.BindVar(StateImpl, VD, X);
+ }
+ } else if (ImplicitParamDecl *IPD = dyn_cast<ImplicitParamDecl>(SD)) {
+ RVal X = RVal::GetSymbolValue(SymMgr, IPD);
+ StateMgr.BindVar(StateImpl, IPD, X);
}
+
+
}
return StateMgr.getPersistentState(StateImpl);