diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-07-05 14:23:59 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-07-05 14:23:59 +0000 |
commit | c192b3dcffd5e672a2b2e1730e2440febb4fb192 (patch) | |
tree | ac719b5984165053bf83d71142e4d96b609b9784 /lib/AST/Expr.cpp | |
parent | 2e645aa5697838f16ec570eb07c2bee7e13d0e0b (diff) |
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r-- | lib/AST/Expr.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 36f4139f83521..87f9ffba78e3a 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -3154,10 +3154,10 @@ bool Expr::HasSideEffects(const ASTContext &Ctx, } // Recurse to children. - for (const_child_range SubStmts = children(); SubStmts; ++SubStmts) - if (const Stmt *S = *SubStmts) - if (cast<Expr>(S)->HasSideEffects(Ctx, IncludePossibleEffects)) - return true; + for (const Stmt *SubStmt : children()) + if (SubStmt && + cast<Expr>(SubStmt)->HasSideEffects(Ctx, IncludePossibleEffects)) + return true; return false; } |