From 6a94bb1a731c68860043e62bf60a0d14ea21e176 Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Fri, 2 Mar 2018 20:10:38 +0000 Subject: [PATCH] Range-ify a for loop. NFC git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326607 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGBlocks.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp index 3c3b9220cd..6695860b88 100644 --- a/lib/CodeGen/CGBlocks.cpp +++ b/lib/CodeGen/CGBlocks.cpp @@ -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 cleanups = E->getObjects(); - for (ArrayRef::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. -- 2.40.0