diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-12-20 06:32:12 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-12-20 06:32:12 +0000 |
commit | 4193eca10ce0cc8b2dae887e935a43b26f492b5b (patch) | |
tree | 33cef340f16cf56312c13fef38e99d749d76db7f /lib/Analysis/GRExprEngine.cpp | |
parent | 848b34baf2094a377ad2929d0d47cdc833ecdfca (diff) |
Lazy bingding for region-store manager.
* Now Bind() methods take and return GRState* because binding could
also alter GDM.
* No variables are initialized except those declared with initial
values.
* failed C test cases are due to bugs in RemoveDeadBindings(),
which removes constraints that is still alive. This will be fixed in later
patch.
* default value of array and struct regions will be implemented in later patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61274 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r-- | lib/Analysis/GRExprEngine.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp index e6c12ead89..0dd6b5fa68 100644 --- a/lib/Analysis/GRExprEngine.cpp +++ b/lib/Analysis/GRExprEngine.cpp @@ -1811,7 +1811,8 @@ void GRExprEngine::VisitDeclStmt(DeclStmt* DS, NodeTy* Pred, NodeSet& Dst) { for (NodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) { const GRState* St = GetState(*I); unsigned Count = Builder->getCurrentBlockCount(); - + + // Decls without InitExpr are not initialized explicitly. if (InitEx) { SVal InitVal = GetSVal(St, InitEx); QualType T = VD->getType(); @@ -1829,11 +1830,9 @@ void GRExprEngine::VisitDeclStmt(DeclStmt* DS, NodeTy* Pred, NodeSet& Dst) { } } - St = StateMgr.BindDecl(St, VD, &InitVal, Count); - } - else - St = StateMgr.BindDecl(St, VD, 0, Count); - + St = StateMgr.BindDecl(St, VD, InitVal); + } else + St = StateMgr.BindDeclWithNoInit(St, VD); // Check if 'VD' is a VLA and if so check if has a non-zero size. QualType T = getContext().getCanonicalType(VD->getType()); |