Bug fix in dead stores: don't always check the liveness of the first decl
in a DeclStmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49708 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/DeadStores.cpp b/lib/Analysis/DeadStores.cpp
index 0f869dc..62a4e3e 100644
--- a/lib/Analysis/DeadStores.cpp
+++ b/lib/Analysis/DeadStores.cpp
@@ -65,7 +65,7 @@
if (V->hasLocalStorage())
if (Expr* E = V->getInit()) {
- if (!Live(DS->getDecl(),AD)) {
+ if (!Live(V, AD)) {
// Special case: check for initializations with constants.
//
// e.g. : int x = 0;