Fixed incompatibility with MSVC builds in range-based for loops in DataRecursiveASTVisitor and RecursiveASTVisitor for OpenMP constructs.

llvm-svn: 212601
This commit is contained in:
Alexey Bataev 2014-07-09 10:00:31 +00:00
parent 3b2fb0af40
commit 4c8c903b59
2 changed files with 8 additions and 4 deletions

View File

@ -2273,8 +2273,9 @@ DEF_TRAVERSE_STMT(AsTypeExpr, {})
template <typename Derived>
bool RecursiveASTVisitor<Derived>::TraverseOMPExecutableDirective(
OMPExecutableDirective *S) {
for (auto *C : S->clauses())
for (auto *C : S->clauses()) {
TRY_TO(TraverseOMPClause(C));
}
return true;
}
@ -2376,8 +2377,9 @@ bool RecursiveASTVisitor<Derived>::VisitOMPNowaitClause(OMPNowaitClause *) {
template <typename Derived>
template <typename T>
bool RecursiveASTVisitor<Derived>::VisitOMPClauseList(T *Node) {
for (auto *E : Node->varlists())
for (auto *E : Node->varlists()) {
TRY_TO(TraverseStmt(E));
}
return true;
}

View File

@ -2295,8 +2295,9 @@ DEF_TRAVERSE_STMT(AsTypeExpr, {})
template <typename Derived>
bool RecursiveASTVisitor<Derived>::TraverseOMPExecutableDirective(
OMPExecutableDirective *S) {
for (auto *C : S->clauses())
for (auto *C : S->clauses()) {
TRY_TO(TraverseOMPClause(C));
}
return true;
}
@ -2398,8 +2399,9 @@ bool RecursiveASTVisitor<Derived>::VisitOMPNowaitClause(OMPNowaitClause *) {
template <typename Derived>
template <typename T>
bool RecursiveASTVisitor<Derived>::VisitOMPClauseList(T *Node) {
for (auto *E : Node->varlists())
for (auto *E : Node->varlists()) {
TRY_TO(TraverseStmt(E));
}
return true;
}