diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-07-03 15:12:24 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-07-03 15:12:24 +0000 |
commit | efb037a10e984ed3f8dc78d7d0d29fb6465760b9 (patch) | |
tree | f39482dad556fe49a4d31226a5636b7b5265d3b8 /lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp | |
parent | 6b3af82767d94ec83c36d17db1e52e60ac20dd0f (diff) |
Rewrite users of Stmt::child_begin/end into for-range loops.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241355 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp b/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp index 296aec6680..fb07484bfc 100644 --- a/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp @@ -65,10 +65,9 @@ public: } void VisitChildren(const Stmt *S) { - for (Stmt::const_child_iterator I = S->child_begin(), E = S->child_end(); - I!=E; ++I) - if (const Stmt *child = *I) - VisitChild(S, child); + for (const Stmt *Child : S->children()) + if (Child) + VisitChild(S, Child); } TypeCallPair VisitCastExpr(const CastExpr *E) { |