]> granicus.if.org Git - clang/commitdiff
[OPENMP] Small update for C++11
authorAlexey Bataev <a.bataev@hotmail.com>
Thu, 3 Apr 2014 02:55:46 +0000 (02:55 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Thu, 3 Apr 2014 02:55:46 +0000 (02:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205506 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/TreeTransform.h
lib/Serialization/ASTWriterStmt.cpp

index 2c7328983a3b4c3239a1e87b27bf592434b3f328..f78fca7a290b8e7d37b77f78c2876537b0badb76 100644 (file)
@@ -6439,10 +6439,8 @@ OMPClause *
 TreeTransform<Derived>::TransformOMPCopyinClause(OMPCopyinClause *C) {
   llvm::SmallVector<Expr *, 16> Vars;
   Vars.reserve(C->varlist_size());
-  for (OMPCopyinClause::varlist_iterator I = C->varlist_begin(),
-                                         E = C->varlist_end();
-       I != E; ++I) {
-    ExprResult EVar = getDerived().TransformExpr(cast<Expr>(*I));
+  for (auto *I : C->varlists()) {
+    ExprResult EVar = getDerived().TransformExpr(cast<Expr>(I));
     if (EVar.isInvalid())
       return 0;
     Vars.push_back(EVar.take());
index 42b1dfb367fbe9a83fe44dead55f05a64f8823fb..dd44a695a25c61fd7aa637d05b2535c6d7c8c7ec 100644 (file)
@@ -1719,10 +1719,8 @@ void OMPClauseWriter::VisitOMPSharedClause(OMPSharedClause *C) {
 void OMPClauseWriter::VisitOMPCopyinClause(OMPCopyinClause *C) {
   Record.push_back(C->varlist_size());
   Writer->Writer.AddSourceLocation(C->getLParenLoc(), Record);
-  for (OMPCopyinClause::varlist_iterator I = C->varlist_begin(),
-                                         E = C->varlist_end();
-       I != E; ++I)
-    Writer->Writer.AddStmt(*I);
+  for (auto *I : C->varlists())
+    Writer->Writer.AddStmt(I);
 }
 
 //===----------------------------------------------------------------------===//