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
diff --git a/Analysis/ValueState.cpp b/Analysis/ValueState.cpp
index 00b6607..1b08d8e 100644
--- a/Analysis/ValueState.cpp
+++ b/Analysis/ValueState.cpp
@@ -155,6 +155,10 @@
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));
}