summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/StmtProfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/StmtProfile.cpp')
-rw-r--r--clang/lib/AST/StmtProfile.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp
index 63f432ca4c3..da996920c42 100644
--- a/clang/lib/AST/StmtProfile.cpp
+++ b/clang/lib/AST/StmtProfile.cpp
@@ -69,9 +69,9 @@ namespace {
void StmtProfiler::VisitStmt(const Stmt *S) {
ID.AddInteger(S->getStmtClass());
- for (Stmt::const_child_range C = S->children(); C; ++C) {
- if (*C)
- Visit(*C);
+ for (const Stmt *SubStmt : S->children()) {
+ if (SubStmt)
+ Visit(SubStmt);
else
ID.AddInteger(0);
}
OpenPOWER on IntegriCloud