diff options
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 2566db30a02..caca6d115bf 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -10446,15 +10446,14 @@ void Sema::ActOnBlockArguments(SourceLocation CaretLoc, Declarator &ParamInfo, ProcessDeclAttributes(CurScope, CurBlock->TheDecl, ParamInfo); // Put the parameter variables in scope. - for (BlockDecl::param_iterator AI = CurBlock->TheDecl->param_begin(), - E = CurBlock->TheDecl->param_end(); AI != E; ++AI) { - (*AI)->setOwningFunction(CurBlock->TheDecl); + for (auto AI : CurBlock->TheDecl->params()) { + AI->setOwningFunction(CurBlock->TheDecl); // If this has an identifier, add it to the scope stack. - if ((*AI)->getIdentifier()) { - CheckShadow(CurBlock->TheScope, *AI); + if (AI->getIdentifier()) { + CheckShadow(CurBlock->TheScope, AI); - PushOnScopeChains(*AI, CurBlock->TheScope); + PushOnScopeChains(AI, CurBlock->TheScope); } } } |