Modernize a function, NFC.

llvm-svn: 335571
This commit is contained in:
Vedant Kumar 2018-06-26 02:50:01 +00:00
parent 519055336d
commit 2a46384c21
1 changed files with 2 additions and 5 deletions

View File

@ -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 =