diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-15 04:08:54 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-15 04:08:54 +0000 |
commit | dace4c9d65eb86f96c4c5fbf4ac5920b7197a1b0 (patch) | |
tree | 0eb167cf661469de116dce6094c473d1d74a2be9 /lib/Analysis/LiveVariables.cpp | |
parent | 24bd3c4484a6ba54d3d61f576550dcbb68a1c57e (diff) |
++/-- makes a variable live since it is used; thus the liveness state is
"Alive" as opposed to staying the same.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49707 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/LiveVariables.cpp')
-rw-r--r-- | lib/Analysis/LiveVariables.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/LiveVariables.cpp b/lib/Analysis/LiveVariables.cpp index 06f30fa4fd..b704b2d826 100644 --- a/lib/Analysis/LiveVariables.cpp +++ b/lib/Analysis/LiveVariables.cpp @@ -114,10 +114,10 @@ void TransferFuncs::VisitUnaryOperator(UnaryOperator* U) { // until we either find a DeclRefExpr or some non-DeclRefExpr // expression. if (DeclRefExpr* DR = dyn_cast<DeclRefExpr>(E->IgnoreParens())) - if (isa<VarDecl>(DR->getDecl())) { - // Treat the --/++ operator as a kill. Note that the variable - // is still live, just its value has been changed. + if (VarDecl* VD = dyn_cast<VarDecl>(DR->getDecl())) { + // Treat the --/++ operator as a kill. if (AD.Observer) { AD.Observer->ObserverKill(DR); } + LiveState(VD, AD) = Alive; return VisitDeclRefExpr(DR); } |