summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/AST/ParentMap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/clang/lib/AST/ParentMap.cpp')
-rw-r--r--contrib/llvm/tools/clang/lib/AST/ParentMap.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/llvm/tools/clang/lib/AST/ParentMap.cpp b/contrib/llvm/tools/clang/lib/AST/ParentMap.cpp
index a991302..d7d5f9c 100644
--- a/contrib/llvm/tools/clang/lib/AST/ParentMap.cpp
+++ b/contrib/llvm/tools/clang/lib/AST/ParentMap.cpp
@@ -36,8 +36,8 @@ static void BuildParentMap(MapTy& M, Stmt* S,
// If we are rebuilding the map, clear out any existing state.
if (M[POE->getSyntacticForm()])
- for (Stmt::child_range I = S->children(); I; ++I)
- M[*I] = nullptr;
+ for (Stmt *SubStmt : S->children())
+ M[SubStmt] = nullptr;
M[POE->getSyntacticForm()] = S;
BuildParentMap(M, POE->getSyntacticForm(), OV_Transparent);
@@ -82,10 +82,10 @@ static void BuildParentMap(MapTy& M, Stmt* S,
break;
}
default:
- for (Stmt::child_range I = S->children(); I; ++I) {
- if (*I) {
- M[*I] = S;
- BuildParentMap(M, *I, OVMode);
+ for (Stmt *SubStmt : S->children()) {
+ if (SubStmt) {
+ M[SubStmt] = S;
+ BuildParentMap(M, SubStmt, OVMode);
}
}
break;
OpenPOWER on IntegriCloud