diff options
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp b/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp index a61e658f69c9a..81a20063f9722 100644 --- a/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp +++ b/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp @@ -37,9 +37,9 @@ public: } void WalkAST::VisitChildren(Stmt *S) { - for (Stmt::child_iterator I = S->child_begin(), E = S->child_end(); I!=E; ++I) - if (Stmt *child = *I) - Visit(child); + for (Stmt *Child : S->children()) + if (Child) + Visit(Child); } // CWE-467: Use of sizeof() on a Pointer Type |