r205506 - [OPENMP] Small update for C++11
Alexey Bataev
a.bataev at hotmail.com
Wed Apr 2 19:55:47 PDT 2014
Author: abataev
Date: Wed Apr 2 21:55:46 2014
New Revision: 205506
URL: http://llvm.org/viewvc/llvm-project?rev=205506&view=rev
Log:
[OPENMP] Small update for C++11
Modified:
cfe/trunk/lib/Sema/TreeTransform.h
cfe/trunk/lib/Serialization/ASTWriterStmt.cpp
Modified: cfe/trunk/lib/Sema/TreeTransform.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TreeTransform.h?rev=205506&r1=205505&r2=205506&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/TreeTransform.h (original)
+++ cfe/trunk/lib/Sema/TreeTransform.h Wed Apr 2 21:55:46 2014
@@ -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());
Modified: cfe/trunk/lib/Serialization/ASTWriterStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriterStmt.cpp?rev=205506&r1=205505&r2=205506&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriterStmt.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriterStmt.cpp Wed Apr 2 21:55:46 2014
@@ -1719,10 +1719,8 @@ void OMPClauseWriter::VisitOMPSharedClau
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);
}
//===----------------------------------------------------------------------===//
More information about the cfe-commits
mailing list