summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorGeorge Burgess IV <george.burgess.iv@gmail.com>2018-03-02 20:10:38 +0000
committerGeorge Burgess IV <george.burgess.iv@gmail.com>2018-03-02 20:10:38 +0000
commit8b93a591e75c147ab01d13490610bec11b8ef342 (patch)
tree8995e5086466575f97dc09178e343de2c12f3b4b /clang/lib/CodeGen/CGBlocks.cpp
parentbb7228703af46e5e8f30f45368873062a905302b (diff)
downloadbcm5719-llvm-8b93a591e75c147ab01d13490610bec11b8ef342.tar.gz
bcm5719-llvm-8b93a591e75c147ab01d13490610bec11b8ef342.zip
Range-ify a for loop. NFC
llvm-svn: 326607
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
-rw-r--r--clang/lib/CodeGen/CGBlocks.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index 3c3b9220cd5..6695860b881 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/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<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.
OpenPOWER on IntegriCloud