diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-06-06 20:45:41 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-06-06 20:45:41 +0000 |
commit | 581deb3da481053c4993c7600f97acf7768caac5 (patch) | |
tree | 9c3cfe3a1f156e2ac3d7edc4d1a5fdaed4589c1a /lib/Sema/SemaDeclObjC.cpp | |
parent | 1ada2a65833266c139010bedfad87e58e5a7d74d (diff) |
Revert Decl's iterators back to pointer value_type rather than reference value_type
In addition, I've made the pointer and reference typedef 'void' rather than T*
just so they can't get misused. I would've omitted them entirely but
std::distance likes them to be there even if it doesn't use them.
This rolls back r155808 and r155869.
Review by Doug Gregor incorporating feedback from Chandler Carruth.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158104 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 3bcc8ce650..33047b2e5e 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -695,7 +695,7 @@ void Sema::DiagnoseClassExtensionDupMethods(ObjCCategoryDecl *CAT, llvm::DenseMap<Selector, const ObjCMethodDecl*> MethodMap; for (ObjCInterfaceDecl::method_iterator i = ID->meth_begin(), e = ID->meth_end(); i != e; ++i) { - ObjCMethodDecl *MD = &*i; + ObjCMethodDecl *MD = *i; MethodMap[MD->getSelector()] = MD; } @@ -703,7 +703,7 @@ void Sema::DiagnoseClassExtensionDupMethods(ObjCCategoryDecl *CAT, return; for (ObjCCategoryDecl::method_iterator i = CAT->meth_begin(), e = CAT->meth_end(); i != e; ++i) { - ObjCMethodDecl *Method = &*i; + ObjCMethodDecl *Method = *i; const ObjCMethodDecl *&PrevMethod = MethodMap[Method->getSelector()]; if (PrevMethod && !MatchTwoMethodDeclarations(Method, PrevMethod)) { Diag(Method->getLocation(), diag::err_duplicate_method_decl) @@ -1065,7 +1065,7 @@ void Sema::CheckImplementationIvars(ObjCImplementationDecl *ImpDecl, IVI = IDecl->ivar_begin(), IVE = IDecl->ivar_end(); for (; numIvars > 0 && IVI != IVE; ++IVI) { ObjCIvarDecl* ImplIvar = ivars[j++]; - ObjCIvarDecl* ClsIvar = &*IVI; + ObjCIvarDecl* ClsIvar = *IVI; assert (ImplIvar && "missing implementation ivar"); assert (ClsIvar && "missing class ivar"); @@ -2154,7 +2154,7 @@ void Sema::DiagnoseDuplicateIvars(ObjCInterfaceDecl *ID, ObjCInterfaceDecl *SID) { for (ObjCInterfaceDecl::ivar_iterator IVI = ID->ivar_begin(), IVE = ID->ivar_end(); IVI != IVE; ++IVI) { - ObjCIvarDecl* Ivar = &*IVI; + ObjCIvarDecl* Ivar = *IVI; if (Ivar->isInvalidDecl()) continue; if (IdentifierInfo *II = Ivar->getIdentifier()) { @@ -2292,7 +2292,7 @@ Decl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, for (ObjCContainerDecl::prop_iterator I = CDecl->prop_begin(), E = CDecl->prop_end(); I != E; ++I) - ProcessPropertyDecl(&*I, CDecl); + ProcessPropertyDecl(*I, CDecl); CDecl->setAtEndRange(AtEnd); } if (ObjCImplementationDecl *IC=dyn_cast<ObjCImplementationDecl>(ClassDecl)) { @@ -2308,7 +2308,7 @@ Decl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, ClsExtDecl; ClsExtDecl = ClsExtDecl->getNextClassExtension()) { for (ObjCContainerDecl::prop_iterator I = ClsExtDecl->prop_begin(), E = ClsExtDecl->prop_end(); I != E; ++I) { - ObjCPropertyDecl *Property = &*I; + ObjCPropertyDecl *Property = *I; // Skip over properties declared @dynamic if (const ObjCPropertyImplDecl *PIDecl = IC->FindPropertyImplDecl(Property->getIdentifier())) |