diff options
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp')
| -rw-r--r-- | lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp b/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp index bc1d823dde03..ec2a88a55681 100644 --- a/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp @@ -254,13 +254,13 @@ public:              return;            if (Expr* E = V->getInit()) { +            while (ExprWithCleanups *exprClean = dyn_cast<ExprWithCleanups>(E)) +              E = exprClean->getSubExpr(); +                          // Don't warn on C++ objects (yet) until we can show that their              // constructors/destructors don't have side effects.              if (isa<CXXConstructExpr>(E))                return; - -            if (isa<ExprWithCleanups>(E)) -              return;              // A dead initialization is a variable that is dead after it              // is initialized.  We don't flag warnings for those variables | 
