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

Alexey Bataev a.bataev at hotmail.com
Wed Jul 9 03:00:31 PDT 2014


Author: abataev
Date: Wed Jul  9 05:00:31 2014
New Revision: 212601

URL: http://llvm.org/viewvc/llvm-project?rev=212601&view=rev
Log:
Fixed incompatibility with MSVC builds in range-based for loops in DataRecursiveASTVisitor and RecursiveASTVisitor for OpenMP constructs.

Modified:
    cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h
    cfe/trunk/include/clang/AST/RecursiveASTVisitor.h

Modified: cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h?rev=212601&r1=212600&r2=212601&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h (original)
+++ cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h Wed Jul  9 05:00:31 2014
@@ -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>::Visit
 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;
 }
 

Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/RecursiveASTVisitor.h?rev=212601&r1=212600&r2=212601&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/RecursiveASTVisitor.h (original)
+++ cfe/trunk/include/clang/AST/RecursiveASTVisitor.h Wed Jul  9 05:00:31 2014
@@ -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>::Visit
 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;
 }
 





More information about the cfe-commits mailing list