Issue dead store warnings for preincrements involved in a subexpression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53983 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/CheckDeadStores.cpp b/lib/Analysis/CheckDeadStores.cpp
index 433e611..4ab6680 100644
--- a/lib/Analysis/CheckDeadStores.cpp
+++ b/lib/Analysis/CheckDeadStores.cpp
@@ -152,12 +152,7 @@
     else if (UnaryOperator* U = dyn_cast<UnaryOperator>(S)) {
       if (!U->isIncrementOp())
         return;
-      
-      // Don't flag dead stores when the result of a preincrement/predecrement
-      // is used in an enclosing expression.
-      if (U->isPrefix() && Parents.isSubExpr(U))
-        return;
-      
+
       Expr *Ex = U->getSubExpr()->IgnoreParenCasts();
       
       if (DeclRefExpr* DR = dyn_cast<DeclRefExpr>(Ex))