summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-06-26 02:50:01 +0000
committerVedant Kumar <vsk@apple.com>2018-06-26 02:50:01 +0000
commit2a46384c21a93d827d624e8d00c16377a5c0c12c (patch)
treea3f6001ceb37da68af08e14221c7dce165f8c05b
parent519055336d09b510273e1810161832a6e1336838 (diff)
downloadbcm5719-llvm-2a46384c21a93d827d624e8d00c16377a5c0c12c.tar.gz
bcm5719-llvm-2a46384c21a93d827d624e8d00c16377a5c0c12c.zip
Modernize a function, NFC.
llvm-svn: 335571
-rw-r--r--clang/lib/Sema/SemaLambda.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp
index fec0d575e5b..b6ea484cea6 100644
--- a/clang/lib/Sema/SemaLambda.cpp
+++ b/clang/lib/Sema/SemaLambda.cpp
@@ -692,9 +692,7 @@ void Sema::deduceClosureReturnType(CapturingScopeInfo &CSI) {
}
// Third case: only one return statement. Don't bother doing extra work!
- SmallVectorImpl<ReturnStmt*>::iterator I = CSI.Returns.begin(),
- E = CSI.Returns.end();
- if (I+1 == E)
+ if (CSI.Returns.size() == 1)
return;
// General case: many return statements.
@@ -703,8 +701,7 @@ void Sema::deduceClosureReturnType(CapturingScopeInfo &CSI) {
// We require the return types to strictly match here.
// Note that we've already done the required promotions as part of
// processing the return statement.
- for (; I != E; ++I) {
- const ReturnStmt *RS = *I;
+ for (const ReturnStmt *RS : CSI.Returns) {
const Expr *RetE = RS->getRetValue();
QualType ReturnType =
OpenPOWER on IntegriCloud