diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-02-07 01:08:27 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-02-07 01:08:27 +0000 |
commit | 5b6dc2d72bf1bcf2b61fe5dbcd57bfa4aee76b29 (patch) | |
tree | 353518a3802de15695160df571b61fcd42b330bb /Analysis/ValueState.cpp | |
parent | d0739872527aeb0588ec6b3a5a795742020f9455 (diff) |
Added transfer function logic for ReturnStmts.
Fixed insidious bug in handling dereferences.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46835 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Analysis/ValueState.cpp')
-rw-r--r-- | Analysis/ValueState.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Analysis/ValueState.cpp b/Analysis/ValueState.cpp index 00b6607536..1b08d8ea39 100644 --- a/Analysis/ValueState.cpp +++ b/Analysis/ValueState.cpp @@ -155,6 +155,10 @@ LValue ValueStateManager::GetLValue(const StateTy& St, Stmt* S) { if (DeclRefExpr* DR = dyn_cast<DeclRefExpr>(S)) return lval::DeclVal(DR->getDecl()); + if (UnaryOperator* U = dyn_cast<UnaryOperator>(S)) + if (U->getOpcode() == UnaryOperator::Deref) + return cast<LValue>(GetValue(St, U->getSubExpr())); + return cast<LValue>(GetValue(St, S)); } |