summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-17 14:19:37 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-17 14:19:37 +0000
commitbcbb92d12f871a8f927c7f1cfcb45fbd859c8369 (patch)
tree3e026e0ebcfa5528b218f4e9561519ec4bf019d7 /lib/CodeGen/CGClass.cpp
parente5e230f916a8afa17cc1c03c91cafbff01cbc604 (diff)
downloadclang-bcbb92d12f871a8f927c7f1cfcb45fbd859c8369.tar.gz
clang-bcbb92d12f871a8f927c7f1cfcb45fbd859c8369.tar.bz2
clang-bcbb92d12f871a8f927c7f1cfcb45fbd859c8369.tar.xz
[C++11] Replacing CompoundStmt iterators body_begin() and body_end() with iterator_range body(). Updating all of the usages of the iterators with range-based for loops.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204040 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGClass.cpp')
-rw-r--r--lib/CodeGen/CGClass.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp
index 0bfc188c1a..071f8b3237 100644
--- a/lib/CodeGen/CGClass.cpp
+++ b/lib/CodeGen/CGClass.cpp
@@ -1351,11 +1351,8 @@ void CodeGenFunction::emitImplicitAssignmentOperatorBody(FunctionArgList &Args)
LexicalScope Scope(*this, RootCS->getSourceRange());
AssignmentMemcpyizer AM(*this, AssignOp, Args);
- for (CompoundStmt::const_body_iterator I = RootCS->body_begin(),
- E = RootCS->body_end();
- I != E; ++I) {
- AM.emitAssignment(*I);
- }
+ for (auto *I : RootCS->body())
+ AM.emitAssignment(I);
AM.finish();
}