diff options
author | George Burgess IV <george.burgess.iv@gmail.com> | 2018-03-02 20:10:38 +0000 |
---|---|---|
committer | George Burgess IV <george.burgess.iv@gmail.com> | 2018-03-02 20:10:38 +0000 |
commit | 8b93a591e75c147ab01d13490610bec11b8ef342 (patch) | |
tree | 8995e5086466575f97dc09178e343de2c12f3b4b /clang/lib/CodeGen/CGBlocks.cpp | |
parent | bb7228703af46e5e8f30f45368873062a905302b (diff) | |
download | bcm5719-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.cpp | 7 |
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. |