From c192b3dcffd5e672a2b2e1730e2440febb4fb192 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 5 Jul 2015 14:23:59 +0000 Subject: Vendor import of clang trunk r241361: https://llvm.org/svn/llvm-project/cfe/trunk@241361 --- lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp') diff --git a/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp b/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp index 0beb917833d64..e0c113c862629 100644 --- a/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp +++ b/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp @@ -109,9 +109,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); } void WalkAST::VisitCallExpr(CallExpr *CE) { @@ -162,11 +162,11 @@ void WalkAST::VisitCallExpr(CallExpr *CE) { } void WalkAST::VisitCompoundStmt(CompoundStmt *S) { - for (Stmt::child_iterator I = S->child_begin(), E = S->child_end(); I!=E; ++I) - if (Stmt *child = *I) { - if (CallExpr *CE = dyn_cast(child)) + for (Stmt *Child : S->children()) + if (Child) { + if (CallExpr *CE = dyn_cast(Child)) checkUncheckedReturnValue(CE); - Visit(child); + Visit(Child); } } -- cgit v1.2.3