From 973431b22f081a53a6e35d9617427319ad5c8e78 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 3 Jul 2015 15:12:24 +0000 Subject: Rewrite users of Stmt::child_begin/end into for-range loops. No functionality change intended. llvm-svn: 241355 --- clang/lib/Analysis/LiveVariables.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'clang/lib/Analysis/LiveVariables.cpp') diff --git a/clang/lib/Analysis/LiveVariables.cpp b/clang/lib/Analysis/LiveVariables.cpp index 0ab158036d8..5e0a9a0d73c 100644 --- a/clang/lib/Analysis/LiveVariables.cpp +++ b/clang/lib/Analysis/LiveVariables.cpp @@ -322,11 +322,10 @@ void TransferFunctions::Visit(Stmt *S) { return; } } - - for (Stmt::child_iterator it = S->child_begin(), ei = S->child_end(); - it != ei; ++it) { - if (Stmt *child = *it) - AddLiveStmt(val.liveStmts, LV.SSetFact, child); + + for (Stmt *Child : S->children()) { + if (Child) + AddLiveStmt(val.liveStmts, LV.SSetFact, Child); } } -- cgit v1.2.3