diff options
author | Vedant Kumar <vsk@apple.com> | 2018-06-26 02:50:01 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2018-06-26 02:50:01 +0000 |
commit | 2a46384c21a93d827d624e8d00c16377a5c0c12c (patch) | |
tree | a3f6001ceb37da68af08e14221c7dce165f8c05b /clang/lib/Sema/SemaLambda.cpp | |
parent | 519055336d09b510273e1810161832a6e1336838 (diff) | |
download | bcm5719-llvm-2a46384c21a93d827d624e8d00c16377a5c0c12c.tar.gz bcm5719-llvm-2a46384c21a93d827d624e8d00c16377a5c0c12c.zip |
Modernize a function, NFC.
llvm-svn: 335571
Diffstat (limited to 'clang/lib/Sema/SemaLambda.cpp')
-rw-r--r-- | clang/lib/Sema/SemaLambda.cpp | 7 |
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 = |