summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.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
commit973431b22f081a53a6e35d9617427319ad5c8e78 (patch)
tree3610d0a1786c7a6f19f92565e11b30f5c5fe7e4f /clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp
parente9da9aa4f386da6930dc663aaed727ce61690570 (diff)
downloadbcm5719-llvm-973431b22f081a53a6e35d9617427319ad5c8e78.tar.gz
bcm5719-llvm-973431b22f081a53a6e35d9617427319ad5c8e78.zip
Rewrite users of Stmt::child_begin/end into for-range loops.
No functionality change intended. llvm-svn: 241355
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp
index c42a2b2984f..53fd069bf15 100644
--- a/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp
@@ -40,13 +40,10 @@ static const DeclRefExpr *FindBlockDeclRefExpr(const Stmt *S,
if (BR->getDecl() == VD)
return BR;
- for (Stmt::const_child_iterator I = S->child_begin(), E = S->child_end();
- I!=E; ++I)
- if (const Stmt *child = *I) {
- const DeclRefExpr *BR = FindBlockDeclRefExpr(child, VD);
- if (BR)
+ for (const Stmt *Child : S->children())
+ if (Child)
+ if (const DeclRefExpr *BR = FindBlockDeclRefExpr(Child, VD))
return BR;
- }
return nullptr;
}
OpenPOWER on IntegriCloud