]> granicus.if.org Git - clang/commitdiff
Range-ify a for loop. NFC
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Fri, 2 Mar 2018 20:10:38 +0000 (20:10 +0000)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Fri, 2 Mar 2018 20:10:38 +0000 (20:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326607 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGBlocks.cpp

index 3c3b9220cd5bfe1c3aa888b5c9c8618da136c2e7..6695860b881f68d9fae266eff3a325c6df424569 100644 (file)
@@ -713,11 +713,8 @@ static void enterBlockScope(CodeGenFunction &CGF, BlockDecl *block) {
 /// kind of cleanup object is a BlockDecl*.
 void CodeGenFunction::enterNonTrivialFullExpression(const ExprWithCleanups *E) {
   assert(E->getNumObjects() != 0);
-  ArrayRef<ExprWithCleanups::CleanupObject> cleanups = E->getObjects();
-  for (ArrayRef<ExprWithCleanups::CleanupObject>::iterator
-         i = cleanups.begin(), e = cleanups.end(); i != e; ++i) {
-    enterBlockScope(*this, *i);
-  }
+  for (const ExprWithCleanups::CleanupObject &C : E->getObjects())
+    enterBlockScope(*this, C);
 }
 
 /// Find the layout for the given block in a linked list and remove it.