Author: mren Date: Wed Jan 27 14:00:32 2016 New Revision: 258979 URL: http://llvm.org/viewvc/llvm-project?rev=258979&view=rev Log: Class Property: handle class properties.
At places where we handle instance properties, if necessary. rdar://23891898 Modified: cfe/trunk/lib/AST/DeclObjC.cpp cfe/trunk/lib/CodeGen/CGDebugInfo.cpp cfe/trunk/lib/Sema/SemaDeclObjC.cpp cfe/trunk/lib/Sema/SemaObjCProperty.cpp Modified: cfe/trunk/lib/AST/DeclObjC.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclObjC.cpp?rev=258979&r1=258978&r2=258979&view=diff ============================================================================== --- cfe/trunk/lib/AST/DeclObjC.cpp (original) +++ cfe/trunk/lib/AST/DeclObjC.cpp Wed Jan 27 14:00:32 2016 @@ -122,7 +122,7 @@ bool ObjCContainerDecl::HasUserDeclaredS // 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::collectInheritedP 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()) { Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=258979&r1=258978&r2=258979&view=diff ============================================================================== --- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original) +++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed Jan 27 14:00:32 2016 @@ -1822,11 +1822,11 @@ llvm::DIType *CGDebugInfo::CreateTypeDef { 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) Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=258979&r1=258978&r2=258979&view=diff ============================================================================== --- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original) +++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Wed Jan 27 14:00:32 2016 @@ -3637,7 +3637,7 @@ Decl *Sema::ActOnAtEnd(Scope *S, SourceR // 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); } Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaObjCProperty.cpp?rev=258979&r1=258978&r2=258979&view=diff ============================================================================== --- cfe/trunk/lib/Sema/SemaObjCProperty.cpp (original) +++ cfe/trunk/lib/Sema/SemaObjCProperty.cpp Wed Jan 27 14:00:32 2016 @@ -1904,8 +1904,8 @@ Sema::AtomicPropertySetterGetterRules (O 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; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits