diff options
author | Manman Ren <manman.ren@gmail.com> | 2016-01-27 20:00:32 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2016-01-27 20:00:32 +0000 |
commit | efe1bacd92a315b74f526f21419559dac93738ab (patch) | |
tree | bacf012a55516f7855d71873fb7bc44072456c39 /clang | |
parent | 95b533fe4b5a2603f11a6c967319d4ab0ef865ff (diff) | |
download | bcm5719-llvm-efe1bacd92a315b74f526f21419559dac93738ab.tar.gz bcm5719-llvm-efe1bacd92a315b74f526f21419559dac93738ab.zip |
Class Property: handle class properties.
At places where we handle instance properties, if necessary.
rdar://23891898
llvm-svn: 258979
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/AST/DeclObjC.cpp | 4 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaObjCProperty.cpp | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp index aa012edf65c..e804fef2432 100644 --- a/clang/lib/AST/DeclObjC.cpp +++ b/clang/lib/AST/DeclObjC.cpp @@ -122,7 +122,7 @@ bool ObjCContainerDecl::HasUserDeclaredSetterMethod( // declaration of this property. If one found, presumably a setter will // be provided (properties declared in categories will not get // auto-synthesized). - for (const auto *P : Cat->instance_properties()) + for (const auto *P : Cat->properties()) if (P->getIdentifier() == Property->getIdentifier()) { if (P->getPropertyAttributes() & ObjCPropertyDecl::OBJC_PR_readwrite) return true; @@ -1837,7 +1837,7 @@ void ObjCProtocolDecl::collectInheritedProtocolProperties( ProtocolPropertyMap &PM) const { if (const ObjCProtocolDecl *PDecl = getDefinition()) { bool MatchFound = false; - for (auto *Prop : PDecl->instance_properties()) { + for (auto *Prop : PDecl->properties()) { if (Prop == Property) continue; if (Prop->getIdentifier() == Property->getIdentifier()) { diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 6d19e50e9f7..675b5eb07c5 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1822,11 +1822,11 @@ llvm::DIType *CGDebugInfo::CreateTypeDefinition(const ObjCInterfaceType *Ty, { llvm::SmallPtrSet<const IdentifierInfo*, 16> PropertySet; for (const ObjCCategoryDecl *ClassExt : ID->known_extensions()) - for (auto *PD : ClassExt->instance_properties()) { + for (auto *PD : ClassExt->properties()) { PropertySet.insert(PD->getIdentifier()); AddProperty(PD); } - for (const auto *PD : ID->instance_properties()) { + for (const auto *PD : ID->properties()) { // Don't emit duplicate metadata for properties that were already in a // class extension. if (!PropertySet.insert(PD->getIdentifier()).second) diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index e4e3aef2e6c..28b70b3c7c6 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -3637,7 +3637,7 @@ Decl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef<Decl *> allMethods, // ProcessPropertyDecl is responsible for diagnosing conflicts with any // user-defined setter/getter. It also synthesizes setter/getter methods // and adds them to the DeclContext and global method pools. - for (auto *I : CDecl->instance_properties()) + for (auto *I : CDecl->properties()) ProcessPropertyDecl(I); CDecl->setAtEndRange(AtEnd); } diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index 9a976e6e590..e3889621383 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/lib/Sema/SemaObjCProperty.cpp @@ -1904,8 +1904,8 @@ Sema::AtomicPropertySetterGetterRules (ObjCImplDecl* IMPDecl, for (auto *Prop : Ext->instance_properties()) PM[Prop->getIdentifier()] = Prop; - for (ObjCContainerDecl::PropertyMap::iterator I = PM.begin(), E = PM.end(); - I != E; ++I) { + for (ObjCContainerDecl::PropertyMap::iterator I = PM.begin(), E = PM.end(); + I != E; ++I) { const ObjCPropertyDecl *Property = I->second; ObjCMethodDecl *GetterMethod = nullptr; ObjCMethodDecl *SetterMethod = nullptr; |