summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-07 16:09:59 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-07 16:09:59 +0000
commitb2b8b1dc669c2a486e0841f6ac6aab6dc5cc6ec0 (patch)
tree52c666be558e1a81bba2452267c28c7b5f6562f2 /clang/lib/Sema/SemaExpr.cpp
parentbcc77b04bb75722f6acaa29a408d7f8dc1d0e170 (diff)
downloadbcm5719-llvm-b2b8b1dc669c2a486e0841f6ac6aab6dc5cc6ec0.tar.gz
bcm5719-llvm-b2b8b1dc669c2a486e0841f6ac6aab6dc5cc6ec0.zip
[C++11] Replacing BlockDecl iterators param_begin() and param_end() with iterator_range params(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203250
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp11
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);
}
}
}
OpenPOWER on IntegriCloud