Lines Matching defs:Prop

106 CheckPropertyAgainstProtocol(Sema &S, ObjCPropertyDecl *Prop,
115 Prop->getIdentifier(), Prop->isInstanceProperty())) {
116 S.ObjC().DiagnosePropertyMismatch(Prop, ProtoProp, Proto->getIdentifier(),
123 CheckPropertyAgainstProtocol(S, Prop, P, Known);
849 for (const auto &Prop : llvm::enumerate(Properties)) {
851 if (Property->isReadOnly() && !Prop.value()->isReadOnly()) {
852 Property = Prop.value();
853 SelectedIndex = Prop.index();
873 const ObjCPropertyDecl *Prop;
878 for (ObjCPropertyDecl *Prop : Properties) {
880 unsigned Attr = Prop->getPropertyAttributesAsWritten();
885 Mismatches.push_back({Prop, Kind, AttributeName});
917 if (Property->getGetterName() != Prop->getGetterName()) {
918 Mismatches.push_back({Prop, DifferentGetter, ""});
921 if (!Property->isReadOnly() && !Prop->isReadOnly() &&
922 Property->getSetterName() != Prop->getSetterName()) {
923 Mismatches.push_back({Prop, DifferentSetter, ""});
926 QualType LHSType = S.Context.getCanonicalType(Prop->getType());
932 Mismatches.push_back({Prop, IncompatibleType, ""});
972 S.Diag(Note.Prop->getLocation(), diag::note_protocol_property_declare)
976 Diag << Note.Prop->getType();
983 Diag << Note.Prop->getGetterName();
986 Diag << Note.Prop->getSetterName();
997 static bool hasWrittenStorageAttribute(ObjCPropertyDecl *Prop,
999 if (Prop->getPropertyAttributesAsWritten() & OwnershipMask) return true;
1006 if (Prop->isReadOnly()) return false;
1009 auto Category = dyn_cast<ObjCCategoryDecl>(Prop->getDeclContext());
1014 for (auto *Found : OrigClass->lookup(Prop->getDeclName())) {
1022 Prop->getIdentifier(), QueryKind))
1738 for (auto *Prop : IDecl->properties()) {
1739 if (CollectClassPropsOnly && !Prop->isClassProperty())
1741 PropMap[std::make_pair(Prop->getIdentifier(), Prop->isClassProperty())] =
1742 Prop;
1758 for (auto *Prop : CATDecl->properties()) {
1759 if (CollectClassPropsOnly && !Prop->isClassProperty())
1761 PropMap[std::make_pair(Prop->getIdentifier(), Prop->isClassProperty())] =
1762 Prop;
1772 for (auto *Prop : PDecl->properties()) {
1773 if (CollectClassPropsOnly && !Prop->isClassProperty())
1776 SuperPropMap[std::make_pair(Prop->getIdentifier(),
1777 Prop->isClassProperty())];
1781 PropertyFromSuper->getIdentifier() != Prop->getIdentifier()) {
1783 PropMap[std::make_pair(Prop->getIdentifier(),
1784 Prop->isClassProperty())];
1786 PropEntry = Prop;
1842 ObjCPropertyDecl *Prop) {
1845 if (Prop->getPropertyAttributes() & ObjCPropertyAttribute::kind_readonly)
1850 if (!SuperClassImplementsGetter && SDecl->getInstanceMethod(Prop->getGetterName()))
1853 if (!SuperClassImplementsSetter && SDecl->getInstanceMethod(Prop->getSetterName()))
1876 ObjCPropertyDecl *Prop = PropEntry.second;
1878 if (Prop->isInvalidDecl() ||
1879 Prop->isClassProperty() ||
1880 Prop->getPropertyImplementation() == ObjCPropertyDecl::Optional)
1884 Prop->getIdentifier(), Prop->getQueryKind()))
1886 ObjCMethodDecl *ImpMethod = IMPDecl->getInstanceMethod(Prop->getGetterName());
1888 if (Prop->getPropertyAttributes() & ObjCPropertyAttribute::kind_readonly)
1890 ImpMethod = IMPDecl->getInstanceMethod(Prop->getSetterName());
1895 IMPDecl->FindPropertyImplIvarDecl(Prop->getIdentifier())) {
1896 Diag(Prop->getLocation(), diag::warn_no_autosynthesis_shared_ivar_property)
1897 << Prop->getIdentifier();
1903 SuperPropMap[std::make_pair(Prop->getIdentifier(),
1904 Prop->isClassProperty())];
1906 dyn_cast<ObjCProtocolDecl>(Prop->getDeclContext())) {
1911 if (!SuperClassImplementsProperty(IDecl, Prop) && !PropInSuperClass) {
1914 << Prop << Proto;
1915 Diag(Prop->getLocation(), diag::note_property_declare);
1917 (Twine("@synthesize ") + Prop->getName() + ";\n\n").str();
1925 if ((Prop->getPropertyAttributes() &
1929 !IMPDecl->getInstanceMethod(Prop->getSetterName()) &&
1930 !IDecl->HasUserDeclaredSetterMethod(Prop)) {
1931 Diag(Prop->getLocation(), diag::warn_no_autosynthesis_property)
1932 << Prop->getIdentifier();
1935 Diag(Prop->getLocation(), diag::warn_autosynthesis_property_in_superclass)
1936 << Prop->getIdentifier();
1949 /* property = */ Prop->getIdentifier(),
1950 /* ivar = */ Prop->getDefaultSynthIvarName(Context),
1951 Prop->getLocation(), Prop->getQueryKind()));
1952 if (PIDecl && !Prop->isUnavailable()) {
1953 Diag(Prop->getLocation(), diag::warn_missing_explicit_synthesis);
1975 ObjCPropertyDecl *Prop,
1981 x->isClassMethod() == Prop->isClassProperty();
1990 Prop->isClassProperty()))) {
1993 ? (Prop->isClassProperty()
1996 : (Prop->isClassProperty()
1999 S.Diag(IMPDecl->getLocation(), diag) << Prop->getDeclName() << Method;
2000 S.Diag(Prop->getLocation(), diag::note_property_declare);
2098 ObjCPropertyDecl *Prop = P->second;
2100 if (Prop->isInvalidDecl() ||
2101 Prop->getPropertyImplementation() == ObjCPropertyDecl::Optional ||
2102 PropImplMap.count(Prop) ||
2103 Prop->getAvailability() == AR_Unavailable)
2107 DiagnoseUnimplementedAccessor(SemaRef, PrimaryClass, Prop->getGetterName(),
2108 IMPDecl, CDecl, C, Prop, InsMap);
2109 if (!Prop->isReadOnly())
2111 Prop->getSetterName(), IMPDecl, CDecl, C,
2112 Prop, InsMap);
2148 for (auto *Prop : IDecl->properties())
2149 PM[std::make_pair(Prop->getIdentifier(), Prop->isClassProperty())] = Prop;
2151 for (auto *Prop : Ext->properties())
2152 PM[std::make_pair(Prop->getIdentifier(), Prop->isClassProperty())] = Prop;