r212599 - [OPENMP] Fixed incompatibility in [Data]RecursiveASTVisitor::TraverseOMPExecutableDirective method with MSVC for range-based loops.

Alexey Bataev a.bataev at hotmail.com
Wed Jul 9 02:33:30 PDT 2014


Author: abataev
Date: Wed Jul  9 04:33:29 2014
New Revision: 212599

URL: http://llvm.org/viewvc/llvm-project?rev=212599&view=rev
Log:
[OPENMP] Fixed incompatibility in [Data]RecursiveASTVisitor::TraverseOMPExecutableDirective method with MSVC for range-based loops.

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=212599&r1=212598&r2=212599&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h (original)
+++ cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h Wed Jul  9 04:33:29 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;
 }
 

Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/RecursiveASTVisitor.h?rev=212599&r1=212598&r2=212599&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/RecursiveASTVisitor.h (original)
+++ cfe/trunk/include/clang/AST/RecursiveASTVisitor.h Wed Jul  9 04:33:29 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;
 }
 





More information about the cfe-commits mailing list