Fixed incompatibility with MSVC builds in range-based for loops in DataRecursiveASTVi...
authorAlexey Bataev <a.bataev@hotmail.com>
Wed, 9 Jul 2014 10:00:31 +0000 (10:00 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Wed, 9 Jul 2014 10:00:31 +0000 (10:00 +0000)
llvm-svn: 212601

clang/include/clang/AST/DataRecursiveASTVisitor.h
clang/include/clang/AST/RecursiveASTVisitor.h

index 5a0e974..e2dcdbe 100644 (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;
 }
 
index 5e7d0b8..b4c4fd6 100644 (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;
 }