summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-06 23:45:36 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-06 23:45:36 +0000
commit86c9390673f4be9a4064b7f3aa3a25636465758c (patch)
tree41f242a1d9e359fc2c87cf3a462faa7170dabab7 /clang/lib/Sema/SemaDecl.cpp
parent0e4b605e475690f8899c8a8a45e25b24138d2b82 (diff)
downloadbcm5719-llvm-86c9390673f4be9a4064b7f3aa3a25636465758c.tar.gz
bcm5719-llvm-86c9390673f4be9a4064b7f3aa3a25636465758c.zip
[C++11] Replacing iterators redecls_begin() and redecls_end() with iterator_range redecls(). Updating all of the usages of the iterators with range-based for loops, which allows the begin/end forms to be removed entirely.
llvm-svn: 203179
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index acf27e23c2e..9840d1eca11 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -5540,11 +5540,9 @@ void Sema::CheckShadow(Scope *S, VarDecl *D, const LookupResult& R) {
if (shadowedVar->isExternC()) {
// For shadowing external vars, make sure that we point to the global
// declaration, not a locally scoped extern declaration.
- for (VarDecl::redecl_iterator
- I = shadowedVar->redecls_begin(), E = shadowedVar->redecls_end();
- I != E; ++I)
+ for (auto I : shadowedVar->redecls())
if (I->isFileVarDecl()) {
- ShadowedDecl = *I;
+ ShadowedDecl = I;
break;
}
}
@@ -10330,8 +10328,7 @@ bool Sema::isAcceptableTagRedeclaration(const TagDecl *Previous,
}
bool previousMismatch = false;
- for (TagDecl::redecl_iterator I(Previous->redecls_begin()),
- E(Previous->redecls_end()); I != E; ++I) {
+ for (auto I : Previous->redecls()) {
if (I->getTagKind() != NewTag) {
if (!previousMismatch) {
previousMismatch = true;
OpenPOWER on IntegriCloud