summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaLambda.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-10 13:43:55 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-10 13:43:55 +0000
commit62e47c423df03c799c0a0ec7a813b136f51410b7 (patch)
tree106d818c7bf71167f3066fb9cfb451b9a224a58f /clang/lib/Sema/SemaLambda.cpp
parent37da7ae0b6f8b34575faa951fb81aad00d5faf8a (diff)
downloadbcm5719-llvm-62e47c423df03c799c0a0ec7a813b136f51410b7.tar.gz
bcm5719-llvm-62e47c423df03c799c0a0ec7a813b136f51410b7.zip
Reverting llvm::distance changes to use std::distance with iterators instead, per post-commit review feedback.
Replacing llvm::copy changes with SmallVector range-based construction which is a considerably cleaner approach. llvm-svn: 203461
Diffstat (limited to 'clang/lib/Sema/SemaLambda.cpp')
-rw-r--r--clang/lib/Sema/SemaLambda.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp
index 4ef23ad72d4..158324cb82e 100644
--- a/clang/lib/Sema/SemaLambda.cpp
+++ b/clang/lib/Sema/SemaLambda.cpp
@@ -1146,8 +1146,7 @@ void Sema::ActOnLambdaError(SourceLocation StartLoc, Scope *CurScope,
LambdaScopeInfo *LSI = getCurLambda();
CXXRecordDecl *Class = LSI->Lambda;
Class->setInvalidDecl();
- SmallVector<Decl*, 4> Fields;
- llvm::copy(Class->fields(), std::back_inserter(Fields));
+ SmallVector<Decl*, 4> Fields(Class->fields());
ActOnFields(0, Class->getLocation(), Class, Fields, SourceLocation(),
SourceLocation(), 0);
CheckCompletedCXXClass(Class);
@@ -1507,8 +1506,7 @@ ExprResult Sema::ActOnLambdaExpr(SourceLocation StartLoc, Stmt *Body,
addBlockPointerConversion(*this, IntroducerRange, Class, CallOperator);
// Finalize the lambda class.
- SmallVector<Decl*, 4> Fields;
- llvm::copy(Class->fields(), std::back_inserter(Fields));
+ SmallVector<Decl*, 4> Fields(Class->fields());
ActOnFields(0, Class->getLocation(), Class, Fields, SourceLocation(),
SourceLocation(), 0);
CheckCompletedCXXClass(Class);
OpenPOWER on IntegriCloud