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 | cd76f95dd07247d36eccd4fb897f398711263c40 (patch) | |
tree | 821ec8ee1d3afe3e477c5dba2d6ced75b7c0cb02 /clang/lib/Analysis/LiveVariables.cpp | |
parent | 044eb055afc07dcb63d3aece220f3dde484324ff (diff) | |
download | bcm5719-llvm-cd76f95dd07247d36eccd4fb897f398711263c40.tar.gz bcm5719-llvm-cd76f95dd07247d36eccd4fb897f398711263c40.zip |
++/-- makes a variable live since it is used; thus the liveness state is
"Alive" as opposed to staying the same.
llvm-svn: 49707
Diffstat (limited to 'clang/lib/Analysis/LiveVariables.cpp')
-rw-r--r-- | clang/lib/Analysis/LiveVariables.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Analysis/LiveVariables.cpp b/clang/lib/Analysis/LiveVariables.cpp index 06f30fa4fdd..b704b2d8267 100644 --- a/clang/lib/Analysis/LiveVariables.cpp +++ b/clang/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); } |