summaryrefslogtreecommitdiffstats
path: root/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-07-03 15:12:24 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-07-03 15:12:24 +0000
commitefb037a10e984ed3f8dc78d7d0d29fb6465760b9 (patch)
treef39482dad556fe49a4d31226a5636b7b5265d3b8 /lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp
parent6b3af82767d94ec83c36d17db1e52e60ac20dd0f (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.cpp7
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) {