26 #include "llvm/ADT/None.h" 27 #include "llvm/ADT/SmallString.h" 28 #include "llvm/ADT/SmallVector.h" 29 #include "llvm/Support/Casting.h" 30 #include "llvm/Support/ErrorHandling.h" 31 #include "llvm/Support/raw_ostream.h" 38 using namespace clang;
46 if (Elts == 0)
return;
48 List =
new (Ctx)
void*[Elts];
60 set(InList, Elts, Ctx);
74 void ObjCContainerDecl::anchor() {}
82 Ivar != IvarEnd; ++Ivar) {
83 if (
auto *ivar = dyn_cast<ObjCIvarDecl>(*Ivar))
92 bool AllowHidden)
const {
95 if (
const auto *Proto = dyn_cast<ObjCProtocolDecl>(
this)) {
97 if (Def->isHidden() && !AllowHidden)
110 Meth != MethEnd; ++Meth) {
112 if (MD && MD->isInstanceMethod() == isInstance)
128 Meth != MethEnd; ++Meth) {
130 if (MD && MD->isInstanceMethod() && !MD->isImplicit())
134 if (
const auto *
ID = dyn_cast<ObjCInterfaceDecl>(
this)) {
137 for (
const auto *Cat :
ID->visible_categories()) {
139 if (!MD->isImplicit())
141 if (Cat->IsClassExtension())
147 for (
const auto *
P : Cat->properties())
156 for (
const auto *Proto :
ID->all_referenced_protocols())
157 if (Proto->HasUserDeclaredSetterMethod(Property))
168 if (
const auto *PD = dyn_cast<ObjCProtocolDecl>(
this))
169 for (
const auto *PI : PD->protocols())
170 if (PI->HasUserDeclaredSetterMethod(Property))
181 if (
const auto *Proto = dyn_cast<ObjCProtocolDecl>(DC)) {
189 if (
auto *IDecl = dyn_cast<ObjCInterfaceDecl>(DC)) {
190 for (
const auto *Ext : IDecl->visible_extensions())
201 if (
auto *PD = dyn_cast<ObjCPropertyDecl>(*I)) {
205 !PD->isClassProperty()) ||
207 PD->isClassProperty()) ||
209 !PD->isClassProperty()))
212 if (PD->isClassProperty())
227 llvm::raw_svector_ostream os(ivarName);
239 if (
const auto *Proto = dyn_cast<ObjCProtocolDecl>(
this)) {
247 if (
const auto *ClassDecl = dyn_cast<ObjCInterfaceDecl>(
this)) {
248 for (
const auto *Ext : ClassDecl->visible_extensions()) {
249 if (
auto *
P = Ext->FindPropertyDeclaration(PropertyId, QueryKind))
262 case Decl::ObjCProtocol: {
263 const auto *PID = cast<ObjCProtocolDecl>(
this);
264 for (
const auto *I : PID->protocols())
270 case Decl::ObjCInterface: {
271 const auto *OID = cast<ObjCInterfaceDecl>(
this);
273 for (
const auto *Cat : OID->visible_categories()) {
274 if (!Cat->IsClassExtension())
276 PropertyId, QueryKind))
281 for (
const auto *I : OID->all_referenced_protocols())
288 return superClass->FindPropertyDeclaration(PropertyId, QueryKind);
291 case Decl::ObjCCategory: {
292 const auto *OCD = cast<ObjCCategoryDecl>(
this);
294 if (!OCD->IsClassExtension())
295 for (
const auto *I : OCD->protocols())
305 void ObjCInterfaceDecl::anchor() {}
314 return def->getTypeParamListAsWritten();
333 for (
auto *typeParam : *TypeParamList)
334 typeParam->setDeclContext(
this);
342 if (data().ExternallyCompleted)
343 LoadExternalDefinition();
359 return superTInfo->getTypeLoc().getBeginLoc();
375 if (data().ExternallyCompleted)
376 LoadExternalDefinition();
384 for (
const auto *I : all_referenced_protocols())
395 PM[std::make_pair(Prop->getIdentifier(), Prop->isClassProperty())] = Prop;
398 for (
const auto *Ext : known_extensions()) {
401 PM[std::make_pair(Prop->getIdentifier(), Prop->isClassProperty())] = Prop;
405 for (
const auto *PI : all_referenced_protocols())
406 PI->collectPropertiesToImplement(PM, PO);
415 if (Class->
hasAttr<ArcWeakrefUnavailableAttr>())
425 if (Class->
hasAttr<ObjCRequiresPropertyDefsAttr>())
435 if (data().ExternallyCompleted)
436 LoadExternalDefinition();
438 if (data().AllReferencedProtocols.empty() &&
439 data().ReferencedProtocols.empty()) {
440 data().AllReferencedProtocols.set(ExtList, ExtNum, C);
448 for (
unsigned i = 0;
i < ExtNum;
i++) {
449 bool protocolExists =
false;
451 for (
auto *Proto : all_referenced_protocols()) {
453 protocolExists =
true;
460 ProtocolRefs.push_back(ProtoInExtension);
463 if (ProtocolRefs.empty())
467 ProtocolRefs.append(all_referenced_protocol_begin(),
468 all_referenced_protocol_end());
470 data().AllReferencedProtocols.set(ProtocolRefs.data(), ProtocolRefs.size(),
C);
474 ObjCInterfaceDecl::findInterfaceWithDesignatedInitializers()
const {
479 if (!IFace->inheritsDesignatedInitializers())
488 if (MD->getMethodFamily() ==
OMF_init && !MD->isOverriding())
492 for (
const auto *MD : Ext->instance_methods()) {
493 if (MD->getMethodFamily() ==
OMF_init && !MD->isOverriding())
498 for (
const auto *MD : ImplD->instance_methods()) {
499 if (MD->getMethodFamily() ==
OMF_init && !MD->isOverriding())
506 bool ObjCInterfaceDecl::inheritsDesignatedInitializers()
const {
507 switch (data().InheritedDesignatedInitializers) {
508 case DefinitionData::IDI_Inherited:
510 case DefinitionData::IDI_NotInherited:
512 case DefinitionData::IDI_Unknown:
517 data().InheritedDesignatedInitializers = DefinitionData::IDI_NotInherited;
519 if (
auto SuperD = getSuperClass()) {
520 data().InheritedDesignatedInitializers =
521 SuperD->declaresOrInheritsDesignatedInitializers() ?
522 DefinitionData::IDI_Inherited :
523 DefinitionData::IDI_NotInherited;
525 data().InheritedDesignatedInitializers =
526 DefinitionData::IDI_NotInherited;
529 assert(data().InheritedDesignatedInitializers
530 != DefinitionData::IDI_Unknown);
531 return data().InheritedDesignatedInitializers ==
532 DefinitionData::IDI_Inherited;
535 llvm_unreachable(
"unexpected InheritedDesignatedInitializers value");
541 if (!isThisDeclarationADefinition())
543 if (data().ExternallyCompleted)
544 LoadExternalDefinition();
551 if (MD->isThisDeclarationADesignatedInitializer())
552 Methods.push_back(MD);
554 for (
const auto *MD : Ext->instance_methods())
555 if (MD->isThisDeclarationADesignatedInitializer())
556 Methods.push_back(MD);
562 bool HasCompleteDef = isThisDeclarationADefinition();
568 HasCompleteDef =
true;
574 if (data().ExternallyCompleted)
575 LoadExternalDefinition();
582 if (MD->isThisDeclarationADesignatedInitializer()) {
590 if (MD->isThisDeclarationADesignatedInitializer()) {
600 void ObjCInterfaceDecl::allocateDefinitionData() {
601 assert(!
hasDefinition() &&
"ObjC class already has a definition");
603 Data.getPointer()->Definition =
this;
607 cast<ObjCInterfaceType>(TypeForDecl)->
Decl =
this;
611 allocateDefinitionData();
626 if (data().ExternallyCompleted)
627 LoadExternalDefinition();
630 while (ClassDecl !=
nullptr) {
632 clsDeclared = ClassDecl;
638 clsDeclared = ClassDecl;
657 if (data().ExternallyCompleted)
658 LoadExternalDefinition();
661 while (ClassDecl !=
nullptr) {
671 for (
auto *
P : all_referenced_protocols())
672 if (
P->lookupProtocolNamed(Name))
684 bool shallowCategoryLookup,
695 if (data().ExternallyCompleted)
696 LoadExternalDefinition();
700 if ((MethodDecl = ClassDecl->
getMethod(Sel, isInstance)))
705 if ((MethodDecl = Cat->getMethod(Sel, isInstance)))
710 for (
const auto *I : ClassDecl->
protocols())
711 if ((MethodDecl = I->lookupMethod(Sel, isInstance)))
715 if (!shallowCategoryLookup)
719 Cat->getReferencedProtocols();
720 for (
auto *Protocol : Protocols)
721 if ((MethodDecl = Protocol->lookupMethod(Sel, isInstance)))
741 bool Instance)
const {
746 if (data().ExternallyCompleted)
747 LoadExternalDefinition();
751 Method = Instance ? ImpDecl->getInstanceMethod(Sel)
752 : ImpDecl->getClassMethod(Sel);
756 Method = getCategoryMethod(Sel, Instance);
761 if (!Instance && !Method && !getSuperClass()) {
762 Method = lookupInstanceMethod(Sel);
766 Method = lookupPrivateMethod(Sel,
true);
769 if (!Method && getSuperClass())
770 return getSuperClass()->lookupPrivateMethod(Sel, Instance);
782 bool isVariadic,
bool isPropertyAccessor,
783 bool isImplicitlyDeclared,
bool isDefined,
784 ImplementationControl impControl,
785 bool HasRelatedResultType)
786 :
NamedDecl(ObjCMethod, contextDecl, beginLoc, SelInfo),
787 DeclContext(ObjCMethod), MethodDeclType(T), ReturnTInfo(ReturnTInfo),
793 setInstanceMethod(isInstance);
794 setVariadic(isVariadic);
795 setPropertyAccessor(isPropertyAccessor);
796 setDefined(isDefined);
797 setIsRedeclaration(
false);
798 setHasRedeclaration(
false);
799 setDeclImplementation(impControl);
801 setRelatedResultType(HasRelatedResultType);
803 setOverriding(
false);
804 setHasSkippedBody(
false);
812 DeclContext *contextDecl,
bool isInstance,
bool isVariadic,
813 bool isPropertyAccessor,
bool isImplicitlyDeclared,
bool isDefined,
816 beginLoc, endLoc, SelInfo, T, ReturnTInfo, contextDecl, isInstance,
817 isVariadic, isPropertyAccessor, isImplicitlyDeclared, isDefined,
818 impControl, HasRelatedResultType);
827 return getMethodFamily() ==
OMF_init &&
828 hasAttr<ObjCDesignatedInitializerAttr>();
832 if (
const auto *PD = dyn_cast<const ObjCProtocolDecl>(
getDeclContext()))
844 if (isa<ObjCProtocolDecl>(DC))
847 return ID->isDesignatedInitializer(getSelector(), InitMethod);
858 setIsRedeclaration(
true);
862 void ObjCMethodDecl::setParamsAndSelLocs(
ASTContext &
C,
865 ParamsAndSelLocs =
nullptr;
866 NumParams = Params.size();
867 if (Params.empty() && SelLocs.empty())
871 "Alignment not sufficient for SourceLocation");
873 unsigned Size =
sizeof(
ParmVarDecl *) * NumParams +
875 ParamsAndSelLocs = C.
Allocate(Size);
876 std::copy(Params.begin(), Params.end(), getParams());
877 std::copy(SelLocs.begin(), SelLocs.end(), getStoredSelLocs());
882 for (
unsigned i = 0, e = getNumSelectorLocs();
i != e; ++
i)
883 SelLocs.push_back(getSelectorLoc(
i));
890 "No selector locs for non-implicit method");
892 return setParamsAndSelLocs(C, Params,
llvm::None);
897 return setParamsAndSelLocs(C, Params,
llvm::None);
899 setParamsAndSelLocs(C, Params, SelLocs);
908 if (hasRedeclaration())
915 if (!CtxD->isInvalidDecl()) {
916 if (
auto *IFD = dyn_cast<ObjCInterfaceDecl>(CtxD)) {
918 if (!ImplD->isInvalidDecl())
921 }
else if (
auto *CD = dyn_cast<ObjCCategoryDecl>(CtxD)) {
923 if (!ImplD->isInvalidDecl())
926 }
else if (
auto *ImplD = dyn_cast<ObjCImplementationDecl>(CtxD)) {
928 if (!IFD->isInvalidDecl())
931 }
else if (
auto *CImplD = dyn_cast<ObjCCategoryImplDecl>(CtxD)) {
933 if (!CatD->isInvalidDecl())
944 if (!Redecl && isRedeclaration()) {
946 return cast<ObjCContainerDecl>(CtxD)->
getMethod(getSelector(),
950 return Redecl ? Redecl :
this;
956 if (
auto *ImplD = dyn_cast<ObjCImplementationDecl>(CtxD)) {
961 }
else if (
auto *CImplD = dyn_cast<ObjCCategoryImplDecl>(CtxD)) {
968 if (isRedeclaration()) {
971 cast<ObjCContainerDecl>(CtxD)->
getMethod(getSelector(),
973 return MD ? MD :
this;
981 return Body->getEndLoc();
991 if (
const ObjCMethodFamilyAttr *attr = getAttr<ObjCMethodFamilyAttr>()) {
994 switch (attr->getFamily()) {
1006 family = getSelector().getMethodFamily();
1023 if (!getReturnType()->isObjCObjectPointerType())
1048 unsigned noParams = param_size();
1049 if (noParams < 1 || noParams > 3)
1058 while (--noParams) {
1079 bool &selfIsPseudoStrong,
1080 bool &selfIsConsumed) {
1082 selfIsPseudoStrong =
false;
1083 selfIsConsumed =
false;
1098 selfIsConsumed = hasAttr<NSConsumesSelfAttr>();
1107 if (getMethodFamily() !=
OMF_init && !selfIsConsumed) {
1109 selfIsPseudoStrong =
true;
1113 assert(isClassMethod());
1116 selfIsPseudoStrong =
true;
1124 bool selfIsPseudoStrong, selfIsConsumed;
1126 getSelfType(Context, OID, selfIsPseudoStrong, selfIsConsumed);
1133 Self->addAttr(NSConsumedAttr::CreateImplicit(Context));
1135 if (selfIsPseudoStrong)
1136 Self->setARCPseudoStrong(
true);
1147 return CD->getClassInterface();
1149 return IMD->getClassInterface();
1152 llvm_unreachable(
"unknown method context");
1156 const auto *TSI = getReturnTypeSourceInfo();
1158 return TSI->getTypeLoc().getSourceRange();
1164 return getReturnType().getNonLValueExprType(Ctx)
1179 bool MovedToSuper) {
1186 if (
const auto *
Category = dyn_cast<ObjCCategoryDecl>(Container)) {
1194 if (Method != Overridden) {
1197 Methods.push_back(Overridden);
1201 for (
const auto *
P :
Category->protocols())
1211 if (Method != Overridden) {
1214 Methods.push_back(Overridden);
1218 if (
const auto *Protocol = dyn_cast<ObjCProtocolDecl>(Container)){
1219 for (
const auto *
P : Protocol->protocols())
1223 if (
const auto *Interface = dyn_cast<ObjCInterfaceDecl>(Container)) {
1224 for (
const auto *
P : Interface->protocols())
1227 for (
const auto *Cat : Interface->known_categories())
1247 if (
const auto *ProtD =
1251 }
else if (
const auto *IMD =
1264 }
else if (
const auto *CatD =
1280 Method, overridden);
1295 assert(!Overridden.empty() &&
1296 "ObjCMethodDecl's overriding bit is not as expected");
1307 if (isPropertyAccessor()) {
1308 const auto *Container = cast<ObjCContainerDecl>(
getParent());
1309 bool IsGetter = (NumArgs == 0);
1314 auto findMatchingProperty =
1317 for (
const auto *I : Container->instance_properties()) {
1318 Selector NextSel = IsGetter ? I->getGetterName()
1319 : I->getSetterName();
1324 for (
const auto *I : Container->class_properties()) {
1325 Selector NextSel = IsGetter ? I->getGetterName()
1326 : I->getSetterName();
1336 if (
const auto *Found = findMatchingProperty(Container))
1341 if (
const auto *
Category = dyn_cast<ObjCCategoryDecl>(Container)) {
1342 ClassDecl =
Category->getClassInterface();
1343 if (
const auto *Found = findMatchingProperty(ClassDecl))
1353 if (Ext == Container)
1356 if (
const auto *Found = findMatchingProperty(Ext))
1361 llvm_unreachable(
"Marked as a property accessor but no property found!");
1364 if (!CheckOverrides)
1369 OverridesTy Overrides;
1370 getOverriddenMethods(Overrides);
1371 for (
const auto *Override : Overrides)
1382 void ObjCTypeParamDecl::anchor() {}
1394 nameLoc, name, colonLoc, boundInfo);
1413 if (hasExplicitBound()) {
1415 getTypeSourceInfo()->getTypeLoc().
getEndLoc());
1427 : NumParams(typeParams.size()) {
1430 std::copy(typeParams.begin(), typeParams.end(), begin());
1439 ctx.
Allocate(totalSizeToAlloc<ObjCTypeParamDecl *>(typeParams.size()),
1446 typeArgs.reserve(size());
1447 for (
auto typeParam : *
this)
1448 typeArgs.push_back(typeParam->getUnderlyingType());
1488 setPreviousDecl(PrevDecl);
1492 Data = PrevDecl->Data;
1496 setTypeParamList(typeParamList);
1499 void ObjCInterfaceDecl::LoadExternalDefinition()
const {
1500 assert(data().ExternallyCompleted &&
"Class is not externally completed");
1501 data().ExternallyCompleted =
false;
1503 const_cast<ObjCInterfaceDecl *>(
this));
1508 "Class can't be externally completed without an external source");
1510 "Forward declarations can't be externally completed");
1511 data().ExternallyCompleted =
true;
1516 if (!isThisDeclarationADefinition())
1518 data().HasDesignatedInitializers =
true;
1523 if (!isThisDeclarationADefinition())
1525 if (data().ExternallyCompleted)
1526 LoadExternalDefinition();
1528 return data().HasDesignatedInitializers;
1533 if (
const auto *ObjCRTName = getAttr<ObjCRuntimeNameAttr>())
1534 return ObjCRTName->getMetadataName();
1542 const_cast<ObjCImplementationDecl*>(
this)->getClassInterface())
1543 return ID->getObjCRuntimeNameAsString();
1550 if (data().ExternallyCompleted)
1551 LoadExternalDefinition();
1554 const_cast<ObjCInterfaceDecl*>(Def));
1567 struct SynthesizeIvarChunk {
1572 : Size(size), Ivar(ivar) {}
1575 bool operator<(
const SynthesizeIvarChunk & LHS,
1576 const SynthesizeIvarChunk &RHS) {
1577 return LHS.Size < RHS.Size;
1597 if (!data().IvarList) {
1598 if (!ivar_empty()) {
1600 data().IvarList = *I; ++I;
1601 for (curIvar = data().IvarList; I != E; curIvar = *I, ++I)
1605 for (
const auto *Ext : known_extensions()) {
1606 if (!Ext->ivar_empty()) {
1608 I = Ext->ivar_begin(),
1609 E = Ext->ivar_end();
1610 if (!data().IvarList) {
1611 data().IvarList = *I; ++I;
1612 curIvar = data().IvarList;
1614 for ( ;I != E; curIvar = *I, ++I)
1618 data().IvarListMissingImplementation =
true;
1622 if (!data().IvarListMissingImplementation)
1623 return data().IvarList;
1626 data().IvarListMissingImplementation =
false;
1627 if (!ImplDecl->ivar_empty()) {
1629 for (
auto *IV : ImplDecl->ivars()) {
1630 if (IV->getSynthesize() && !IV->isInvalidDecl()) {
1631 layout.push_back(SynthesizeIvarChunk(
1632 IV->getASTContext().getTypeSize(IV->getType()), IV));
1635 if (!data().IvarList)
1636 data().IvarList = IV;
1642 if (!layout.empty()) {
1644 llvm::stable_sort(layout);
1645 unsigned Ix = 0, EIx = layout.size();
1646 if (!data().IvarList) {
1647 data().IvarList = layout[0].Ivar; Ix++;
1648 curIvar = data().IvarList;
1650 for ( ; Ix != EIx; curIvar = layout[Ix].Ivar, Ix++)
1655 return data().IvarList;
1668 if (data().ExternallyCompleted)
1669 LoadExternalDefinition();
1671 for (
auto *Cat : visible_categories())
1672 if (Cat->getIdentifier() == CategoryId)
1680 for (
const auto *Cat : visible_categories()) {
1690 for (
const auto *Cat : visible_categories()) {
1703 bool lookupCategory,
1704 bool RHSIsQualifiedID) {
1719 if (RHSIsQualifiedID &&
1726 for (
const auto *Cat : visible_categories()) {
1727 for (
auto *PI : Cat->protocols())
1745 void ObjCIvarDecl::anchor() {}
1764 assert((isa<ObjCInterfaceDecl>(DC) || isa<ObjCImplementationDecl>(DC) ||
1765 isa<ObjCCategoryDecl>(DC)) &&
1766 "Invalid ivar decl context!");
1771 if (
auto *IM = dyn_cast<ObjCImplementationDecl>(DC))
1772 ID = IM->getClassInterface();
1774 ID = cast<ObjCCategoryDecl>(DC)->getClassInterface();
1776 ID->setIvarList(
nullptr);
1779 return new (
C, DC)
ObjCIvarDecl(DC, StartLoc, IdLoc, Id, T, TInfo, ac, BW,
1792 switch (DC->getKind()) {
1794 case ObjCCategoryImpl:
1796 llvm_unreachable(
"invalid ivar container!");
1799 case ObjCCategory: {
1800 const auto *CD = cast<ObjCCategoryDecl>(DC);
1801 assert(CD->IsClassExtension() &&
"invalid container for ivar!");
1802 return CD->getClassInterface();
1805 case ObjCImplementation:
1806 return cast<ObjCImplementationDecl>(DC)->getClassInterface();
1809 return cast<ObjCInterfaceDecl>(DC);
1822 void ObjCAtDefsFieldDecl::anchor() {}
1842 void ObjCProtocolDecl::anchor() {}
1849 redeclarable_base(C) {
1850 setPreviousDecl(PrevDecl);
1852 Data = PrevDecl->Data;
1881 for (
auto *I : protocols())
1891 bool isInstance)
const {
1900 if ((MethodDecl =
getMethod(Sel, isInstance)))
1903 for (
const auto *I : protocols())
1904 if ((MethodDecl = I->lookupMethod(Sel, isInstance)))
1909 void ObjCProtocolDecl::allocateDefinitionData() {
1910 assert(!Data.getPointer() &&
"Protocol already has a definition!");
1912 Data.getPointer()->Definition =
this;
1916 allocateDefinitionData();
1920 RD->Data = this->Data;
1926 for (
auto *Prop : PDecl->properties()) {
1928 PM.insert(std::make_pair(
1929 std::make_pair(Prop->getIdentifier(), Prop->isClassProperty()),
1934 for (
const auto *PI : PDecl->protocols())
1935 PI->collectPropertiesToImplement(PM, PO);
1943 if (!PS.insert(PDecl).second)
1945 for (
auto *Prop : PDecl->properties()) {
1946 if (Prop == Property)
1954 for (
const auto *PI : PDecl->protocols())
1955 PI->collectInheritedProtocolProperties(Property, PS, PO);
1961 if (
const auto *ObjCRTName = getAttr<ObjCRuntimeNameAttr>())
1962 return ObjCRTName->getMetadataName();
1971 void ObjCCategoryDecl::anchor() {}
1981 ClassInterface(IDecl), CategoryNameLoc(CategoryNameLoc),
1982 IvarLBraceLoc(IvarLBraceLoc), IvarRBraceLoc(IvarRBraceLoc) {
1983 setTypeParamList(typeParamList);
1997 IDecl, typeParamList, IvarLBraceLoc,
2005 L->AddedObjCCategoryToInterface(CatDecl, IDecl);
2016 nullptr,
nullptr,
nullptr);
2021 const_cast<ObjCCategoryDecl*>(
this));
2029 TypeParamList = TPL;
2033 for (
auto *typeParam : *TypeParamList)
2034 typeParam->setDeclContext(
this);
2041 void ObjCCategoryImplDecl::anchor() {}
2053 atStartLoc, CategoryNameLoc);
2070 void ObjCImplDecl::anchor() {}
2074 property->setLexicalDeclContext(
this);
2081 if (
auto *ImplD = dyn_cast_or_null<ObjCImplementationDecl>(
this)) {
2085 }
else if (
auto *ImplD = dyn_cast_or_null<ObjCCategoryImplDecl>(
this)) {
2090 ClassInterface = IFace;
2098 for (
auto *PID : property_impls())
2099 if (PID->getPropertyIvarDecl() &&
2100 PID->getPropertyIvarDecl()->getIdentifier() == ivarId)
2112 for (
auto *PID : property_impls())
2115 if (PID->getPropertyDecl()->getIdentifier() ==
Id) {
2117 !PID->getPropertyDecl()->isClassProperty()) ||
2119 PID->getPropertyDecl()->isClassProperty()) ||
2121 !PID->getPropertyDecl()->isClassProperty()))
2124 if (PID->getPropertyDecl()->isClassProperty())
2125 ClassPropImpl = PID;
2130 return ClassPropImpl;
2145 void ObjCImplementationDecl::anchor() {}
2159 nameLoc, atStartLoc, superLoc,
2160 IvarLBraceLoc, IvarRBraceLoc);
2171 unsigned numInitializers) {
2172 if (numInitializers > 0) {
2173 NumIvarInitializers = numInitializers;
2175 memcpy(ivarInitializers, initializers,
2177 IvarInitializers = ivarInitializers;
2183 return IvarInitializers.get(
getASTContext().getExternalSource());
2196 void ObjCCompatibleAliasDecl::anchor() {}
2216 void ObjCPropertyDecl::anchor() {}
2267 if (IvarLoc.isValid())
ObjCMethodDecl * lookupMethod(Selector Sel, bool isInstance) const
Defines the clang::ASTContext interface.
bool hasDefinition() const
Determine whether this class has been defined.
void setExternallyCompleted()
Indicate that this Objective-C class is complete, but that the external AST source will be responsibl...
void setImplicit(bool I=true)
protocol_range protocols() const
Smart pointer class that efficiently represents Objective-C method names.
QualType getObjCIdType() const
Represents the Objective-CC id type.
unsigned getRawEncoding() const
When a SourceLocation itself cannot be used, this returns an (opaque) 32-bit integer encoding for it...
A (possibly-)qualified type.
static ObjCIvarDecl * CreateDeserialized(ASTContext &C, unsigned ID)
void getDesignatedInitializers(llvm::SmallVectorImpl< const ObjCMethodDecl *> &Methods) const
Returns the designated initializers for the interface.
ObjCInterfaceDecl * getClassInterface()
void startDefinition()
Starts the definition of this Objective-C class, taking it from a forward declaration (@class) to a d...
virtual Stmt * getBody() const
getBody - If this Decl represents a declaration for a body of code, such as a function or method defi...
Stmt - This represents one statement.
SourceLocation getSuperClassLoc() const
Retrieve the starting location of the superclass.
C Language Family Type Representation.
void setObjCLifetime(ObjCLifetime type)
llvm::mapped_iterator< param_const_iterator, GetTypeFn > param_type_iterator
QualType getQualifiedType(SplitQualType split) const
Un-split a SplitQualType.
Decl - This represents one declaration (or definition), e.g.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
NamedDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N)
static ObjCProtocolDecl * Create(ASTContext &C, DeclContext *DC, IdentifierInfo *Id, SourceLocation nameLoc, SourceLocation atStartLoc, ObjCProtocolDecl *PrevDecl)
static ObjCPropertyDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, SourceLocation AtLocation, SourceLocation LParenLocation, QualType T, TypeSourceInfo *TSI, PropertyControl propControl=None)
ObjCTypeParamList * getTypeParamList() const
Retrieve the type parameters of this class.
void ** List
List is an array of pointers to objects that are not owned by this object.
const DiagnosticBuilder & operator<<(const DiagnosticBuilder &DB, const Attr *At)
ObjCProtocolDecl * lookupNestedProtocol(IdentifierInfo *Name)
bool isDesignatedInitializer(Selector Sel, const ObjCMethodDecl **InitMethod=nullptr) const
Returns true if the given selector is a designated initializer for the interface. ...
SourceLocation getEndLoc() const LLVM_READONLY
QualType withConst() const
A container of type source information.
bool isOverriding() const
Whether this method overrides any other in the class hierarchy.
void createImplicitParams(ASTContext &Context, const ObjCInterfaceDecl *ID)
createImplicitParams - Used to lazily create the self and cmd implict parameters. ...
CXXCtorInitializer *const * init_const_iterator
init_const_iterator - Iterates through the ivar initializer list.
void setImplementation(ObjCCategoryImplDecl *ImplD)
ObjCCategoryImplDecl * getImplementation() const
Parameter for Objective-C '_cmd' argument.
ObjCMethodDecl - Represents an instance or class method declaration.
ObjCImplementationDecl * getObjCImplementation(ObjCInterfaceDecl *D)
Get the implementation of the ObjCInterfaceDecl D, or nullptr if none exists.
bool ClassImplementsProtocol(ObjCProtocolDecl *lProto, bool lookupCategory, bool RHSIsQualifiedID=false)
ClassImplementsProtocol - Checks that 'lProto' protocol has been implemented in IDecl class...
bool isInvalidDecl() const
QualType getObjCClassType() const
Represents the Objective-C Class type.
static ObjCPropertyDecl * findPropertyDecl(const DeclContext *DC, const IdentifierInfo *propertyID, ObjCPropertyQueryKind queryKind)
Lookup a property by name in the specified DeclContext.
static const NamedDecl * getDefinition(const Decl *D)
Represents a parameter to a function.
The collection of all-type qualifiers we support.
IdentifierInfo * getIdentifier() const
Get the identifier that names this declaration, if there is one.
One of these records is kept for each identifier that is lexed.
Represents a class type in Objective C.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
The results of name lookup within a DeclContext.
ObjCMethodFamily
A family of Objective-C methods.
bool isObjCIdType() const
void setTypeParamList(ObjCTypeParamList *TPL)
Set the type parameters of this class.
SourceRange getReturnTypeSourceRange() const
instmeth_range instance_methods() const
StringRef getObjCRuntimeNameAsString() const
Produce a name to be used for protocol's metadata.
prop_range properties() const
bool isObjCSelType() const
void startDefinition()
Starts the definition of this Objective-C protocol.
visible_categories_range visible_categories() const
void set(ObjCProtocolDecl *const *InList, unsigned Elts, const SourceLocation *Locs, ASTContext &Ctx)
bool ProtocolCompatibleWithProtocol(ObjCProtocolDecl *lProto, ObjCProtocolDecl *rProto) const
ProtocolCompatibleWithProtocol - return 'true' if 'lProto' is in the inheritance hierarchy of 'rProto...
ObjCMethodFamily getMethodFamily() const
Determines the family of this method.
bool isThisDeclarationADesignatedInitializer() const
Returns true if this specific method declaration is marked with the designated initializer attribute...
void collectPropertiesToImplement(PropertyMap &PM, PropertyDeclOrder &PO) const override
This routine collects list of properties to be implemented in the class.
static ObjCInterfaceDecl * Create(const ASTContext &C, DeclContext *DC, SourceLocation atLoc, IdentifierInfo *Id, ObjCTypeParamList *typeParamList, ObjCInterfaceDecl *PrevDecl, SourceLocation ClassLoc=SourceLocation(), bool isInternal=false)
void set(void *const *InList, unsigned Elts, ASTContext &Ctx)
ObjCContainerDecl - Represents a container for method declarations.
static ObjCCategoryDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation AtLoc, SourceLocation ClassNameLoc, SourceLocation CategoryNameLoc, IdentifierInfo *Id, ObjCInterfaceDecl *IDecl, ObjCTypeParamList *typeParamList, SourceLocation IvarLBraceLoc=SourceLocation(), SourceLocation IvarRBraceLoc=SourceLocation())
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
static ObjCPropertyImplDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation atLoc, SourceLocation L, ObjCPropertyDecl *property, Kind PK, ObjCIvarDecl *ivarDecl, SourceLocation ivarLoc)
const ObjCInterfaceDecl * isObjCRequiresPropertyDefs() const
isObjCRequiresPropertyDefs - Checks that a class or one of its super classes must not be auto-synthes...
static ObjCAtDefsFieldDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, QualType T, Expr *BW)
static ObjCCategoryImplDecl * CreateDeserialized(ASTContext &C, unsigned ID)
ObjCCategoryDecl * getCategoryListRaw() const
Retrieve the raw pointer to the start of the category/extension list.
ObjCProtocolDecl * getDefinition()
Retrieve the definition of this protocol, if any.
const Type * getTypePtr() const
Retrieves a pointer to the underlying (unqualified) type.
void getOverriddenMethods(SmallVectorImpl< const ObjCMethodDecl *> &Overridden) const
Return overridden methods for the given Method.
void setAsRedeclaration(const ObjCMethodDecl *PrevMethod)
Represents an Objective-C protocol declaration.
Represents an ObjC class declaration.
void setMethodParams(ASTContext &C, ArrayRef< ParmVarDecl *> Params, ArrayRef< SourceLocation > SelLocs=llvm::None)
Sets the method's parameters and selector source locations.
virtual Decl * getCanonicalDecl()
Retrieves the "canonical" declaration of the given declaration.
ObjCMethodDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
lookup_result lookup(DeclarationName Name) const
lookup - Find the declarations (if any) with the given Name in this context.
void getSelectorLocs(SmallVectorImpl< SourceLocation > &SelLocs) const
static ImplicitParamDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation IdLoc, IdentifierInfo *Id, QualType T, ImplicitParamKind ParamKind)
Create implicit parameter.
ObjCPropertyImplDecl - Represents implementation declaration of a property in a class or category imp...
ObjCMethodDecl * getCategoryInstanceMethod(Selector Sel) const
ObjCMethodDecl * getCategoryClassMethod(Selector Sel) const
ObjCContainerDecl(Kind DK, DeclContext *DC, IdentifierInfo *Id, SourceLocation nameLoc, SourceLocation atStartLoc)
visible_extensions_range visible_extensions() const
ObjCProtocolDecl * lookupProtocolNamed(IdentifierInfo *PName)
static ObjCCompatibleAliasDecl * CreateDeserialized(ASTContext &C, unsigned ID)
IdentifierInfo * getNSObjectName() const
Retrieve the identifier 'NSObject'.
void setTypeParamList(ObjCTypeParamList *TPL)
Set the type parameters of this category.
SourceLocation getEndLoc() const LLVM_READONLY
QualType getUsageType(QualType objectType) const
Retrieve the type of this instance variable when viewed as a member of a specific object type...
void setNextIvar(ObjCIvarDecl *ivar)
This represents one expression.
Defines the clang::LangOptions interface.
static ObjCMethodDecl * Create(ASTContext &C, SourceLocation beginLoc, SourceLocation endLoc, Selector SelInfo, QualType T, TypeSourceInfo *ReturnTInfo, DeclContext *contextDecl, bool isInstance=true, bool isVariadic=false, bool isPropertyAccessor=false, bool isImplicitlyDeclared=false, bool isDefined=false, ImplementationControl impControl=None, bool HasRelatedResultType=false)
Selector getSetterName() const
bool HasUserDeclaredSetterMethod(const ObjCPropertyDecl *P) const
This routine returns 'true' if a user declared setter method was found in the class, its protocols, its super classes or categories.
IdentifierInfo * getDefaultSynthIvarName(ASTContext &Ctx) const
Get the default name of the synthesized ivar.
static void collectOverriddenMethodsSlow(const ObjCMethodDecl *Method, SmallVectorImpl< const ObjCMethodDecl *> &overridden)
void setObjCMethodRedeclaration(const ObjCMethodDecl *MD, const ObjCMethodDecl *Redecl)
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
static ObjCTypeParamDecl * Create(ASTContext &ctx, DeclContext *dc, ObjCTypeParamVariance variance, SourceLocation varianceLoc, unsigned index, SourceLocation nameLoc, IdentifierInfo *name, SourceLocation colonLoc, TypeSourceInfo *boundInfo)
DeclContext * getDeclContext()
ObjCInterfaceDecl * getSuperClass() const
An abstract interface that should be implemented by listeners that want to be notified when an AST en...
static ObjCTypeParamList * create(ASTContext &ctx, SourceLocation lAngleLoc, ArrayRef< ObjCTypeParamDecl *> typeParams, SourceLocation rAngleLoc)
Create a new Objective-C type parameter list.
ObjCPropertyDecl * FindPropertyVisibleInPrimaryClass(IdentifierInfo *PropertyId, ObjCPropertyQueryKind QueryKind) const
FindPropertyVisibleInPrimaryClass - Finds declaration of the property with name 'PropertyId' in the p...
Defines the clang::TypeLoc interface and its subclasses.
void setObjCImplementation(ObjCInterfaceDecl *IFaceD, ObjCImplementationDecl *ImplD)
Set the implementation of ObjCInterfaceDecl.
void setImplementation(ObjCImplementationDecl *ImplD)
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
void mergeClassExtensionProtocolList(ObjCProtocolDecl *const *List, unsigned Num, ASTContext &C)
mergeClassExtensionProtocolList - Merge class extension's protocol list into the protocol list for th...
ObjCIvarDecl * lookupInstanceVariable(IdentifierInfo *IVarName, ObjCInterfaceDecl *&ClassDeclared)
const ObjCMethodDecl * getObjCMethodRedeclaration(const ObjCMethodDecl *MD) const
Get the duplicate declaration of a ObjCMethod in the same interface, or null if none exists...
DeclContext * getParent()
getParent - Returns the containing DeclContext.
QualType substObjCMemberType(QualType objectType, const DeclContext *dc, ObjCSubstitutionContext context) const
Substitute type arguments from an object type for the Objective-C type parameters used in the subject...
llvm::SmallDenseSet< const ObjCProtocolDecl *, 8 > ProtocolPropertySet
QualType getObjCInterfaceType(const ObjCInterfaceDecl *Decl, ObjCInterfaceDecl *PrevDecl=nullptr) const
getObjCInterfaceType - Return the unique reference to the type for the specified ObjC interface decl...
static bool hasDefinition(const ObjCObjectPointerType *ObjPtr)
bool isInstanceMethod() const
unsigned getNumArgs() const
Selector getSelector() const
The result type of a method or function.
static ObjCTypeParamDecl * CreateDeserialized(ASTContext &ctx, unsigned ID)
ObjCTypeParamVariance
Describes the variance of a given generic parameter.
static bool isIntroducingInitializers(const ObjCInterfaceDecl *D)
static ObjCMethodDecl * CreateDeserialized(ASTContext &C, unsigned ID)
init_iterator init_begin()
init_begin() - Retrieve an iterator to the first initializer.
static ObjCCompatibleAliasDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, ObjCInterfaceDecl *aliasedClass)
bool definedInNSObject(const ASTContext &) const
Is this method defined in the NSObject base class?
static ObjCProtocolDecl * CreateDeserialized(ASTContext &C, unsigned ID)
Assigning into this object requires the old value to be released and the new value to be retained...
QualType getSelfType(ASTContext &Context, const ObjCInterfaceDecl *OID, bool &selfIsPseudoStrong, bool &selfIsConsumed)
Encodes a location in the source.
IdentifierInfo & get(StringRef Name)
Return the identifier token info for the specified named identifier.
void setAtStartLoc(SourceLocation Loc)
ASTContext & getASTContext() const LLVM_READONLY
ObjCCategoryDecl * getCategoryDecl() const
QualType getObjCSelType() const
Retrieve the type that corresponds to the predefined Objective-C 'SEL' type.
Stmt * getBody() const override
Retrieve the body of this method, if it has one.
static void CollectOverriddenMethodsRecurse(const ObjCContainerDecl *Container, const ObjCMethodDecl *Method, SmallVectorImpl< const ObjCMethodDecl *> &Methods, bool MovedToSuper)
ObjCInterfaceDecl * lookupInheritedClass(const IdentifierInfo *ICName)
lookupInheritedClass - This method returns ObjCInterfaceDecl * of the super class whose name is passe...
ObjCCategoryDecl - Represents a category declaration.
DeclContext(Decl::Kind K)
QualType getObjCTypeParamType(const ObjCTypeParamDecl *Decl, ArrayRef< ObjCProtocolDecl *> protocols, QualType Canonical=QualType()) const
Represents one property declaration in an Objective-C interface.
ObjCPropertyImplDecl * FindPropertyImplIvarDecl(IdentifierInfo *ivarId) const
FindPropertyImplIvarDecl - This method lookup the ivar in the list of properties implemented in this ...
bool operator<(DeclarationName LHS, DeclarationName RHS)
Ordering on two declaration names.
__DEVICE__ void * memcpy(void *__a, const void *__b, size_t __c)
ObjCImplementationDecl * getImplementation() const
bool isDesignatedInitializerForTheInterface(const ObjCMethodDecl **InitMethod=nullptr) const
Returns true if the method selector resolves to a designated initializer in the class's interface...
void * Allocate(size_t Size, unsigned Align=8) const
StringRef getName() const
Return the actual identifier string.
QualType getUsageType(QualType objectType) const
Retrieve the type when this property is used with a specific base object type.
redecl_range redecls() const
Returns an iterator range for all the redeclarations of the same decl.
void collectInheritedProtocolProperties(const ObjCPropertyDecl *Property, ProtocolPropertySet &PS, PropertyDeclOrder &PO) const
Dataflow Directional Tag Classes.
ObjCMethodDecl * lookupPrivateMethod(const Selector &Sel, bool Instance=true) const
Lookup a method in the classes implementation hierarchy.
ObjCPropertyDecl * FindPropertyDeclaration(const IdentifierInfo *PropertyId, ObjCPropertyQueryKind QueryKind) const
FindPropertyDeclaration - Finds declaration of the property given its name in 'PropertyId' and return...
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Parameter for Objective-C 'self' argument.
ObjCInterfaceDecl * getDefinition()
Retrieve the definition of this class, or NULL if this class has been forward-declared (with @class) ...
Represents the declaration of an Objective-C type parameter.
static ObjCImplementationDecl * Create(ASTContext &C, DeclContext *DC, ObjCInterfaceDecl *classInterface, ObjCInterfaceDecl *superDecl, SourceLocation nameLoc, SourceLocation atStartLoc, SourceLocation superLoc=SourceLocation(), SourceLocation IvarLBraceLoc=SourceLocation(), SourceLocation IvarRBraceLoc=SourceLocation())
static ObjCCategoryDecl * CreateDeserialized(ASTContext &C, unsigned ID)
const ObjCInterfaceDecl * getContainingInterface() const
Return the class interface that this ivar is logically contained in; this is either the interface whe...
ObjCIvarDecl * getIvarDecl(IdentifierInfo *Id) const
getIvarDecl - This method looks up an ivar in this ContextDecl.
llvm::DenseMap< std::pair< IdentifierInfo *, unsigned >, ObjCPropertyDecl * > PropertyMap
ExternalASTSource * getExternalSource() const
Retrieve a pointer to the external AST source associated with this AST context, if any...
bool isHidden() const
Determine whether this declaration might be hidden from name lookup.
specific_decl_iterator - Iterates over a subrange of declarations stored in a DeclContext, providing only those that are of type SpecificDecl (or a class derived from it).
bool hasDesignatedInitializers() const
Returns true if this interface decl contains at least one initializer marked with the 'objc_designate...
static ObjCIvarDecl * Create(ASTContext &C, ObjCContainerDecl *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, AccessControl ac, Expr *BW=nullptr, bool synthesized=false)
static ObjCAtDefsFieldDecl * CreateDeserialized(ASTContext &C, unsigned ID)
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
StringRef getObjCRuntimeNameAsString() const
Produce a name to be used for class's metadata.
Represents a C++ base or member initializer.
virtual void CompleteType(TagDecl *Tag)
Gives the external AST source an opportunity to complete an incomplete type.
StringRef getObjCRuntimeNameAsString() const
Produce a name to be used for class's metadata.
void setCategoryListRaw(ObjCCategoryDecl *category)
Set the raw pointer to the start of the category/extension list.
void addDecl(Decl *D)
Add the declaration D into this context.
ObjCMethodDecl * lookupMethod(Selector Sel, bool isInstance, bool shallowCategoryLookup=false, bool followSuper=true, const ObjCCategoryDecl *C=nullptr) const
lookupMethod - This method returns an instance/class method by looking in the class, its categories, and its super classes (using a linear search).
QualType getNonLValueExprType(const ASTContext &Context) const
Determine the type of a (typically non-lvalue) expression with the specified result type...
ObjCMethodDeclBitfields ObjCMethodDeclBits
ASTMutationListener * getASTMutationListener() const
Retrieve a pointer to the AST mutation listener associated with this AST context, if any...
void gatherDefaultTypeArgs(SmallVectorImpl< QualType > &typeArgs) const
Gather the default set of type arguments to be substituted for these type parameters when dealing wit...
No particular method family.
const ObjCPropertyDecl * findPropertyDecl(bool CheckOverrides=true) const
Returns the property associated with this method's selector.
Represents a field declaration created by an @defs(...).
Defines the clang::SourceLocation class and associated facilities.
static bool isInstanceMethod(const Decl *D)
void setIvarInitializers(ASTContext &C, CXXCtorInitializer **initializers, unsigned numInitializers)
ObjCPropertyImplDecl * FindPropertyImplDecl(IdentifierInfo *propertyId, ObjCPropertyQueryKind queryKind) const
FindPropertyImplDecl - This method looks up a previous ObjCPropertyImplDecl added to the list of thos...
static ObjCImplementationDecl * CreateDeserialized(ASTContext &C, unsigned ID)
void setHasRedeclaration(bool HRD) const
void setClassInterface(ObjCInterfaceDecl *IFace)
ObjCIvarDecl - Represents an ObjC instance variable.
QualType getSendResultType() const
Determine the type of an expression that sends a message to this function.
Stores a list of Objective-C type parameters for a parameterized class or a category/extension thereo...
StringRef getName() const
Get the name of identifier for this declaration as a StringRef.
Kind
Lists the kind of concrete classes of Decl.
StringRef getName() const
getName - Get the name of identifier for the class interface associated with this implementation as a...
bool isArcWeakrefUnavailable() const
isArcWeakrefUnavailable - Checks for a class or one of its super classes to be incompatible with __we...
static ObjCInterfaceDecl * CreateDeserialized(const ASTContext &C, unsigned ID)
For nullary selectors, immediately before the end: "[foo release]" / "-(void)release;" Or immediately...
NamedDecl * getMostRecentDecl()
static ObjCPropertyImplDecl * CreateDeserialized(ASTContext &C, unsigned ID)
void addPropertyImplementation(ObjCPropertyImplDecl *property)
A trivial tuple used to represent a source range.
ObjCMethodDecl * getMethod(Selector Sel, bool isInstance, bool AllowHidden=false) const
bool isRedeclaration() const
True if this is a method redeclaration in the same interface.
This represents a decl that may have a name.
ObjCIvarDecl * all_declared_ivar_begin()
all_declared_ivar_begin - return first ivar declared in this class, its extensions and its implementa...
QualType getObjCObjectPointerType(QualType OIT) const
Return a ObjCObjectPointerType type for the given ObjCObjectType.
static ObjCCategoryImplDecl * Create(ASTContext &C, DeclContext *DC, IdentifierInfo *Id, ObjCInterfaceDecl *classInterface, SourceLocation nameLoc, SourceLocation atStartLoc, SourceLocation CategoryNameLoc)
ObjCMethodDecl * getInstanceMethod(Selector Sel, bool AllowHidden=false) const
static ObjCPropertyDecl * CreateDeserialized(ASTContext &C, unsigned ID)
void setHasDesignatedInitializers()
Indicate that this interface decl contains at least one initializer marked with the 'objc_designated_...
void collectPropertiesToImplement(PropertyMap &PM, PropertyDeclOrder &PO) const override
This routine collects list of properties to be implemented in the class.
const LangOptions & getLangOpts() const
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration...
The parameter is invariant: must match exactly.
SourceLocation getLocation() const
ObjCCompatibleAliasDecl - Represents alias of a class.
static void CollectOverriddenMethods(const ObjCContainerDecl *Container, const ObjCMethodDecl *Method, SmallVectorImpl< const ObjCMethodDecl *> &Methods)
ObjCCategoryDecl * FindCategoryDeclaration(IdentifierInfo *CategoryId) const
FindCategoryDeclaration - Finds category declaration in the list of categories for this class and ret...
SelectorLocationsKind hasStandardSelectorLocs(Selector Sel, ArrayRef< SourceLocation > SelLocs, ArrayRef< Expr *> Args, SourceLocation EndLoc)
Returns true if all SelLocs are in a "standard" location.