27 #include "llvm/ADT/None.h" 28 #include "llvm/ADT/SmallString.h" 29 #include "llvm/ADT/SmallVector.h" 30 #include "llvm/Support/Casting.h" 31 #include "llvm/Support/ErrorHandling.h" 32 #include "llvm/Support/raw_ostream.h" 39 using namespace clang;
47 if (Elts == 0)
return;
49 List =
new (Ctx)
void*[Elts];
61 set(InList, Elts, Ctx);
75 void ObjCContainerDecl::anchor() {}
83 Ivar != IvarEnd; ++Ivar) {
84 if (
auto *ivar = dyn_cast<ObjCIvarDecl>(*Ivar))
93 bool AllowHidden)
const {
96 if (
const auto *Proto = dyn_cast<ObjCProtocolDecl>(
this)) {
98 if (Def->isHidden() && !AllowHidden)
111 Meth != MethEnd; ++Meth) {
113 if (MD && MD->isInstanceMethod() == isInstance)
129 Meth != MethEnd; ++Meth) {
131 if (MD && MD->isInstanceMethod() && !MD->isImplicit())
135 if (
const auto *
ID = dyn_cast<ObjCInterfaceDecl>(
this)) {
138 for (
const auto *Cat :
ID->visible_categories()) {
140 if (!MD->isImplicit())
142 if (Cat->IsClassExtension())
148 for (
const auto *
P : Cat->properties())
157 for (
const auto *Proto :
ID->all_referenced_protocols())
158 if (Proto->HasUserDeclaredSetterMethod(Property))
169 if (
const auto *PD = dyn_cast<ObjCProtocolDecl>(
this))
170 for (
const auto *PI : PD->protocols())
171 if (PI->HasUserDeclaredSetterMethod(Property))
182 if (
const auto *Proto = dyn_cast<ObjCProtocolDecl>(DC)) {
190 if (
auto *IDecl = dyn_cast<ObjCInterfaceDecl>(DC)) {
191 for (
const auto *Ext : IDecl->visible_extensions())
202 if (
auto *PD = dyn_cast<ObjCPropertyDecl>(*I)) {
206 !PD->isClassProperty()) ||
208 PD->isClassProperty()) ||
210 !PD->isClassProperty()))
213 if (PD->isClassProperty())
228 llvm::raw_svector_ostream os(ivarName);
240 if (
const auto *Proto = dyn_cast<ObjCProtocolDecl>(
this)) {
248 if (
const auto *ClassDecl = dyn_cast<ObjCInterfaceDecl>(
this)) {
249 for (
const auto *Ext : ClassDecl->visible_extensions()) {
250 if (
auto *
P = Ext->FindPropertyDeclaration(PropertyId, QueryKind))
263 case Decl::ObjCProtocol: {
264 const auto *PID = cast<ObjCProtocolDecl>(
this);
265 for (
const auto *I : PID->protocols())
271 case Decl::ObjCInterface: {
272 const auto *OID = cast<ObjCInterfaceDecl>(
this);
274 for (
const auto *Cat : OID->visible_categories()) {
275 if (!Cat->IsClassExtension())
277 PropertyId, QueryKind))
282 for (
const auto *I : OID->all_referenced_protocols())
289 return superClass->FindPropertyDeclaration(PropertyId, QueryKind);
292 case Decl::ObjCCategory: {
293 const auto *OCD = cast<ObjCCategoryDecl>(
this);
295 if (!OCD->IsClassExtension())
296 for (
const auto *I : OCD->protocols())
306 void ObjCInterfaceDecl::anchor() {}
315 return def->getTypeParamListAsWritten();
334 for (
auto *typeParam : *TypeParamList)
335 typeParam->setDeclContext(
this);
343 if (data().ExternallyCompleted)
344 LoadExternalDefinition();
360 return superTInfo->getTypeLoc().getBeginLoc();
376 if (data().ExternallyCompleted)
377 LoadExternalDefinition();
385 for (
const auto *I : all_referenced_protocols())
396 PM[std::make_pair(Prop->getIdentifier(), Prop->isClassProperty())] = Prop;
399 for (
const auto *Ext : known_extensions()) {
402 PM[std::make_pair(Prop->getIdentifier(), Prop->isClassProperty())] = Prop;
406 for (
const auto *PI : all_referenced_protocols())
407 PI->collectPropertiesToImplement(PM, PO);
416 if (Class->
hasAttr<ArcWeakrefUnavailableAttr>())
426 if (Class->
hasAttr<ObjCRequiresPropertyDefsAttr>())
436 if (data().ExternallyCompleted)
437 LoadExternalDefinition();
439 if (data().AllReferencedProtocols.empty() &&
440 data().ReferencedProtocols.empty()) {
441 data().AllReferencedProtocols.set(ExtList, ExtNum, C);
449 for (
unsigned i = 0; i < ExtNum; i++) {
450 bool protocolExists =
false;
452 for (
auto *Proto : all_referenced_protocols()) {
454 protocolExists =
true;
461 ProtocolRefs.push_back(ProtoInExtension);
464 if (ProtocolRefs.empty())
468 ProtocolRefs.append(all_referenced_protocol_begin(),
469 all_referenced_protocol_end());
471 data().AllReferencedProtocols.set(ProtocolRefs.data(), ProtocolRefs.size(),
C);
475 ObjCInterfaceDecl::findInterfaceWithDesignatedInitializers()
const {
480 if (!IFace->inheritsDesignatedInitializers())
489 if (MD->getMethodFamily() ==
OMF_init && !MD->isOverriding())
493 for (
const auto *MD : Ext->instance_methods()) {
494 if (MD->getMethodFamily() ==
OMF_init && !MD->isOverriding())
499 for (
const auto *MD : ImplD->instance_methods()) {
500 if (MD->getMethodFamily() ==
OMF_init && !MD->isOverriding())
507 bool ObjCInterfaceDecl::inheritsDesignatedInitializers()
const {
508 switch (data().InheritedDesignatedInitializers) {
509 case DefinitionData::IDI_Inherited:
511 case DefinitionData::IDI_NotInherited:
513 case DefinitionData::IDI_Unknown:
518 data().InheritedDesignatedInitializers = DefinitionData::IDI_NotInherited;
520 if (
auto SuperD = getSuperClass()) {
521 data().InheritedDesignatedInitializers =
522 SuperD->declaresOrInheritsDesignatedInitializers() ?
523 DefinitionData::IDI_Inherited :
524 DefinitionData::IDI_NotInherited;
526 data().InheritedDesignatedInitializers =
527 DefinitionData::IDI_NotInherited;
530 assert(data().InheritedDesignatedInitializers
531 != DefinitionData::IDI_Unknown);
532 return data().InheritedDesignatedInitializers ==
533 DefinitionData::IDI_Inherited;
536 llvm_unreachable(
"unexpected InheritedDesignatedInitializers value");
542 if (!isThisDeclarationADefinition())
544 if (data().ExternallyCompleted)
545 LoadExternalDefinition();
552 if (MD->isThisDeclarationADesignatedInitializer())
553 Methods.push_back(MD);
555 for (
const auto *MD : Ext->instance_methods())
556 if (MD->isThisDeclarationADesignatedInitializer())
557 Methods.push_back(MD);
563 bool HasCompleteDef = isThisDeclarationADefinition();
569 HasCompleteDef =
true;
575 if (data().ExternallyCompleted)
576 LoadExternalDefinition();
583 if (MD->isThisDeclarationADesignatedInitializer()) {
591 if (MD->isThisDeclarationADesignatedInitializer()) {
601 void ObjCInterfaceDecl::allocateDefinitionData() {
602 assert(!
hasDefinition() &&
"ObjC class already has a definition");
604 Data.getPointer()->Definition =
this;
608 cast<ObjCInterfaceType>(TypeForDecl)->
Decl =
this;
612 allocateDefinitionData();
627 if (data().ExternallyCompleted)
628 LoadExternalDefinition();
631 while (ClassDecl !=
nullptr) {
633 clsDeclared = ClassDecl;
639 clsDeclared = ClassDecl;
658 if (data().ExternallyCompleted)
659 LoadExternalDefinition();
662 while (ClassDecl !=
nullptr) {
672 for (
auto *
P : all_referenced_protocols())
673 if (
P->lookupProtocolNamed(Name))
685 bool shallowCategoryLookup,
696 if (data().ExternallyCompleted)
697 LoadExternalDefinition();
701 if ((MethodDecl = ClassDecl->
getMethod(Sel, isInstance)))
706 if ((MethodDecl = Cat->getMethod(Sel, isInstance)))
711 for (
const auto *I : ClassDecl->
protocols())
712 if ((MethodDecl = I->lookupMethod(Sel, isInstance)))
716 if (!shallowCategoryLookup)
720 Cat->getReferencedProtocols();
721 for (
auto *Protocol : Protocols)
722 if ((MethodDecl = Protocol->lookupMethod(Sel, isInstance)))
742 bool Instance)
const {
747 if (data().ExternallyCompleted)
748 LoadExternalDefinition();
752 Method = Instance ? ImpDecl->getInstanceMethod(Sel)
753 : ImpDecl->getClassMethod(Sel);
757 Method = getCategoryMethod(Sel, Instance);
762 if (!Instance && !Method && !getSuperClass()) {
763 Method = lookupInstanceMethod(Sel);
767 Method = lookupPrivateMethod(Sel,
true);
770 if (!Method && getSuperClass())
771 return getSuperClass()->lookupPrivateMethod(Sel, Instance);
783 bool isVariadic,
bool isPropertyAccessor,
784 bool isImplicitlyDeclared,
bool isDefined,
785 ImplementationControl impControl,
786 bool HasRelatedResultType)
787 :
NamedDecl(ObjCMethod, contextDecl, beginLoc, SelInfo),
788 DeclContext(ObjCMethod), MethodDeclType(T), ReturnTInfo(ReturnTInfo),
794 setInstanceMethod(isInstance);
795 setVariadic(isVariadic);
796 setPropertyAccessor(isPropertyAccessor);
797 setDefined(isDefined);
798 setIsRedeclaration(
false);
799 setHasRedeclaration(
false);
800 setDeclImplementation(impControl);
802 setRelatedResultType(HasRelatedResultType);
804 setOverriding(
false);
805 setHasSkippedBody(
false);
813 DeclContext *contextDecl,
bool isInstance,
bool isVariadic,
814 bool isPropertyAccessor,
bool isImplicitlyDeclared,
bool isDefined,
817 beginLoc, endLoc, SelInfo, T, ReturnTInfo, contextDecl, isInstance,
818 isVariadic, isPropertyAccessor, isImplicitlyDeclared, isDefined,
819 impControl, HasRelatedResultType);
828 return getMethodFamily() ==
OMF_init &&
829 hasAttr<ObjCDesignatedInitializerAttr>();
833 if (
const auto *PD = dyn_cast<const ObjCProtocolDecl>(
getDeclContext()))
845 if (isa<ObjCProtocolDecl>(DC))
848 return ID->isDesignatedInitializer(getSelector(), InitMethod);
859 setIsRedeclaration(
true);
863 void ObjCMethodDecl::setParamsAndSelLocs(
ASTContext &
C,
866 ParamsAndSelLocs =
nullptr;
867 NumParams = Params.size();
868 if (Params.empty() && SelLocs.empty())
872 "Alignment not sufficient for SourceLocation");
874 unsigned Size =
sizeof(
ParmVarDecl *) * NumParams +
876 ParamsAndSelLocs = C.
Allocate(Size);
877 std::copy(Params.begin(), Params.end(), getParams());
878 std::copy(SelLocs.begin(), SelLocs.end(), getStoredSelLocs());
883 for (
unsigned i = 0, e = getNumSelectorLocs(); i != e; ++i)
884 SelLocs.push_back(getSelectorLoc(i));
891 "No selector locs for non-implicit method");
893 return setParamsAndSelLocs(C, Params,
llvm::None);
898 return setParamsAndSelLocs(C, Params,
llvm::None);
900 setParamsAndSelLocs(C, Params, SelLocs);
909 if (hasRedeclaration())
916 if (!CtxD->isInvalidDecl()) {
917 if (
auto *IFD = dyn_cast<ObjCInterfaceDecl>(CtxD)) {
919 if (!ImplD->isInvalidDecl())
922 }
else if (
auto *CD = dyn_cast<ObjCCategoryDecl>(CtxD)) {
924 if (!ImplD->isInvalidDecl())
927 }
else if (
auto *ImplD = dyn_cast<ObjCImplementationDecl>(CtxD)) {
929 if (!IFD->isInvalidDecl())
932 }
else if (
auto *CImplD = dyn_cast<ObjCCategoryImplDecl>(CtxD)) {
934 if (!CatD->isInvalidDecl())
945 if (!Redecl && isRedeclaration()) {
947 return cast<ObjCContainerDecl>(CtxD)->
getMethod(getSelector(),
951 return Redecl ? Redecl :
this;
957 if (
auto *ImplD = dyn_cast<ObjCImplementationDecl>(CtxD)) {
962 }
else if (
auto *CImplD = dyn_cast<ObjCCategoryImplDecl>(CtxD)) {
969 if (isRedeclaration()) {
972 cast<ObjCContainerDecl>(CtxD)->
getMethod(getSelector(),
974 return MD ? MD :
this;
982 return Body->getEndLoc();
992 if (
const ObjCMethodFamilyAttr *attr = getAttr<ObjCMethodFamilyAttr>()) {
995 switch (attr->getFamily()) {
1007 family = getSelector().getMethodFamily();
1024 if (!getReturnType()->isObjCObjectPointerType())
1049 unsigned noParams = param_size();
1050 if (noParams < 1 || noParams > 3)
1059 while (--noParams) {
1080 bool &selfIsPseudoStrong,
1081 bool &selfIsConsumed) {
1083 selfIsPseudoStrong =
false;
1084 selfIsConsumed =
false;
1099 selfIsConsumed = hasAttr<NSConsumesSelfAttr>();
1108 if (getMethodFamily() !=
OMF_init && !selfIsConsumed) {
1110 selfIsPseudoStrong =
true;
1114 assert(isClassMethod());
1117 selfIsPseudoStrong =
true;
1125 bool selfIsPseudoStrong, selfIsConsumed;
1127 getSelfType(Context, OID, selfIsPseudoStrong, selfIsConsumed);
1134 Self->addAttr(NSConsumedAttr::CreateImplicit(Context));
1136 if (selfIsPseudoStrong)
1137 Self->setARCPseudoStrong(
true);
1148 return CD->getClassInterface();
1150 return IMD->getClassInterface();
1153 llvm_unreachable(
"unknown method context");
1157 const auto *TSI = getReturnTypeSourceInfo();
1159 return TSI->getTypeLoc().getSourceRange();
1165 return getReturnType().getNonLValueExprType(Ctx)
1180 bool MovedToSuper) {
1187 if (
const auto *
Category = dyn_cast<ObjCCategoryDecl>(Container)) {
1195 if (Method != Overridden) {
1198 Methods.push_back(Overridden);
1202 for (
const auto *
P :
Category->protocols())
1212 if (Method != Overridden) {
1215 Methods.push_back(Overridden);
1219 if (
const auto *Protocol = dyn_cast<ObjCProtocolDecl>(Container)){
1220 for (
const auto *
P : Protocol->protocols())
1224 if (
const auto *Interface = dyn_cast<ObjCInterfaceDecl>(Container)) {
1225 for (
const auto *
P : Interface->protocols())
1228 for (
const auto *Cat : Interface->known_categories())
1248 if (
const auto *ProtD =
1252 }
else if (
const auto *IMD =
1265 }
else if (
const auto *CatD =
1281 Method, overridden);
1296 assert(!Overridden.empty() &&
1297 "ObjCMethodDecl's overriding bit is not as expected");
1308 if (isPropertyAccessor()) {
1309 const auto *Container = cast<ObjCContainerDecl>(
getParent());
1310 bool IsGetter = (NumArgs == 0);
1315 auto findMatchingProperty =
1318 for (
const auto *I : Container->instance_properties()) {
1319 Selector NextSel = IsGetter ? I->getGetterName()
1320 : I->getSetterName();
1325 for (
const auto *I : Container->class_properties()) {
1326 Selector NextSel = IsGetter ? I->getGetterName()
1327 : I->getSetterName();
1337 if (
const auto *Found = findMatchingProperty(Container))
1342 if (
const auto *
Category = dyn_cast<ObjCCategoryDecl>(Container)) {
1343 ClassDecl =
Category->getClassInterface();
1344 if (
const auto *Found = findMatchingProperty(ClassDecl))
1354 if (Ext == Container)
1357 if (
const auto *Found = findMatchingProperty(Ext))
1362 llvm_unreachable(
"Marked as a property accessor but no property found!");
1365 if (!CheckOverrides)
1370 OverridesTy Overrides;
1371 getOverriddenMethods(Overrides);
1372 for (
const auto *Override : Overrides)
1383 void ObjCTypeParamDecl::anchor() {}
1395 nameLoc, name, colonLoc, boundInfo);
1414 if (hasExplicitBound()) {
1416 getTypeSourceInfo()->getTypeLoc().
getEndLoc());
1428 : NumParams(typeParams.size()) {
1431 std::copy(typeParams.begin(), typeParams.end(), begin());
1440 ctx.
Allocate(totalSizeToAlloc<ObjCTypeParamDecl *>(typeParams.size()),
1447 typeArgs.reserve(size());
1448 for (
auto typeParam : *
this)
1449 typeArgs.push_back(typeParam->getUnderlyingType());
1489 setPreviousDecl(PrevDecl);
1493 Data = PrevDecl->Data;
1497 setTypeParamList(typeParamList);
1500 void ObjCInterfaceDecl::LoadExternalDefinition()
const {
1501 assert(data().ExternallyCompleted &&
"Class is not externally completed");
1502 data().ExternallyCompleted =
false;
1504 const_cast<ObjCInterfaceDecl *>(
this));
1509 "Class can't be externally completed without an external source");
1511 "Forward declarations can't be externally completed");
1512 data().ExternallyCompleted =
true;
1517 if (!isThisDeclarationADefinition())
1519 data().HasDesignatedInitializers =
true;
1524 if (!isThisDeclarationADefinition())
1526 if (data().ExternallyCompleted)
1527 LoadExternalDefinition();
1529 return data().HasDesignatedInitializers;
1534 if (
const auto *ObjCRTName = getAttr<ObjCRuntimeNameAttr>())
1535 return ObjCRTName->getMetadataName();
1543 const_cast<ObjCImplementationDecl*>(
this)->getClassInterface())
1544 return ID->getObjCRuntimeNameAsString();
1551 if (data().ExternallyCompleted)
1552 LoadExternalDefinition();
1555 const_cast<ObjCInterfaceDecl*>(Def));
1568 struct SynthesizeIvarChunk {
1573 : Size(size), Ivar(ivar) {}
1576 bool operator<(
const SynthesizeIvarChunk & LHS,
1577 const SynthesizeIvarChunk &RHS) {
1578 return LHS.Size < RHS.Size;
1598 if (!data().IvarList) {
1599 if (!ivar_empty()) {
1601 data().IvarList = *I; ++I;
1602 for (curIvar = data().IvarList; I != E; curIvar = *I, ++I)
1606 for (
const auto *Ext : known_extensions()) {
1607 if (!Ext->ivar_empty()) {
1609 I = Ext->ivar_begin(),
1610 E = Ext->ivar_end();
1611 if (!data().IvarList) {
1612 data().IvarList = *I; ++I;
1613 curIvar = data().IvarList;
1615 for ( ;I != E; curIvar = *I, ++I)
1619 data().IvarListMissingImplementation =
true;
1623 if (!data().IvarListMissingImplementation)
1624 return data().IvarList;
1627 data().IvarListMissingImplementation =
false;
1628 if (!ImplDecl->ivar_empty()) {
1630 for (
auto *IV : ImplDecl->ivars()) {
1631 if (IV->getSynthesize() && !IV->isInvalidDecl()) {
1632 layout.push_back(SynthesizeIvarChunk(
1633 IV->getASTContext().getTypeSize(IV->getType()), IV));
1636 if (!data().IvarList)
1637 data().IvarList = IV;
1643 if (!layout.empty()) {
1645 std::stable_sort(layout.begin(), layout.end());
1646 unsigned Ix = 0, EIx = layout.size();
1647 if (!data().IvarList) {
1648 data().IvarList = layout[0].Ivar; Ix++;
1649 curIvar = data().IvarList;
1651 for ( ; Ix != EIx; curIvar = layout[Ix].Ivar, Ix++)
1656 return data().IvarList;
1669 if (data().ExternallyCompleted)
1670 LoadExternalDefinition();
1672 for (
auto *Cat : visible_categories())
1673 if (Cat->getIdentifier() == CategoryId)
1681 for (
const auto *Cat : visible_categories()) {
1691 for (
const auto *Cat : visible_categories()) {
1704 bool lookupCategory,
1705 bool RHSIsQualifiedID) {
1720 if (RHSIsQualifiedID &&
1727 for (
const auto *Cat : visible_categories()) {
1728 for (
auto *PI : Cat->protocols())
1746 void ObjCIvarDecl::anchor() {}
1765 assert((isa<ObjCInterfaceDecl>(DC) || isa<ObjCImplementationDecl>(DC) ||
1766 isa<ObjCCategoryDecl>(DC)) &&
1767 "Invalid ivar decl context!");
1772 if (
auto *IM = dyn_cast<ObjCImplementationDecl>(DC))
1773 ID = IM->getClassInterface();
1775 ID = cast<ObjCCategoryDecl>(DC)->getClassInterface();
1777 ID->setIvarList(
nullptr);
1780 return new (
C, DC)
ObjCIvarDecl(DC, StartLoc, IdLoc, Id, T, TInfo, ac, BW,
1793 switch (DC->getKind()) {
1795 case ObjCCategoryImpl:
1797 llvm_unreachable(
"invalid ivar container!");
1800 case ObjCCategory: {
1801 const auto *CD = cast<ObjCCategoryDecl>(DC);
1802 assert(CD->IsClassExtension() &&
"invalid container for ivar!");
1803 return CD->getClassInterface();
1806 case ObjCImplementation:
1807 return cast<ObjCImplementationDecl>(DC)->getClassInterface();
1810 return cast<ObjCInterfaceDecl>(DC);
1823 void ObjCAtDefsFieldDecl::anchor() {}
1843 void ObjCProtocolDecl::anchor() {}
1850 redeclarable_base(C) {
1851 setPreviousDecl(PrevDecl);
1853 Data = PrevDecl->Data;
1882 for (
auto *I : protocols())
1892 bool isInstance)
const {
1901 if ((MethodDecl =
getMethod(Sel, isInstance)))
1904 for (
const auto *I : protocols())
1905 if ((MethodDecl = I->lookupMethod(Sel, isInstance)))
1910 void ObjCProtocolDecl::allocateDefinitionData() {
1911 assert(!Data.getPointer() &&
"Protocol already has a definition!");
1913 Data.getPointer()->Definition =
this;
1917 allocateDefinitionData();
1921 RD->Data = this->Data;
1927 for (
auto *Prop : PDecl->properties()) {
1929 PM.insert(std::make_pair(
1930 std::make_pair(Prop->getIdentifier(), Prop->isClassProperty()),
1935 for (
const auto *PI : PDecl->protocols())
1936 PI->collectPropertiesToImplement(PM, PO);
1944 if (!PS.insert(PDecl).second)
1946 for (
auto *Prop : PDecl->properties()) {
1947 if (Prop == Property)
1955 for (
const auto *PI : PDecl->protocols())
1956 PI->collectInheritedProtocolProperties(Property, PS, PO);
1962 if (
const auto *ObjCRTName = getAttr<ObjCRuntimeNameAttr>())
1963 return ObjCRTName->getMetadataName();
1972 void ObjCCategoryDecl::anchor() {}
1982 ClassInterface(IDecl), CategoryNameLoc(CategoryNameLoc),
1983 IvarLBraceLoc(IvarLBraceLoc), IvarRBraceLoc(IvarRBraceLoc) {
1984 setTypeParamList(typeParamList);
1998 IDecl, typeParamList, IvarLBraceLoc,
2006 L->AddedObjCCategoryToInterface(CatDecl, IDecl);
2017 nullptr,
nullptr,
nullptr);
2022 const_cast<ObjCCategoryDecl*>(
this));
2030 TypeParamList = TPL;
2034 for (
auto *typeParam : *TypeParamList)
2035 typeParam->setDeclContext(
this);
2042 void ObjCCategoryImplDecl::anchor() {}
2054 atStartLoc, CategoryNameLoc);
2071 void ObjCImplDecl::anchor() {}
2075 property->setLexicalDeclContext(
this);
2082 if (
auto *ImplD = dyn_cast_or_null<ObjCImplementationDecl>(
this)) {
2086 }
else if (
auto *ImplD = dyn_cast_or_null<ObjCCategoryImplDecl>(
this)) {
2091 ClassInterface = IFace;
2099 for (
auto *PID : property_impls())
2100 if (PID->getPropertyIvarDecl() &&
2101 PID->getPropertyIvarDecl()->getIdentifier() == ivarId)
2113 for (
auto *PID : property_impls())
2116 if (PID->getPropertyDecl()->getIdentifier() ==
Id) {
2118 !PID->getPropertyDecl()->isClassProperty()) ||
2120 PID->getPropertyDecl()->isClassProperty()) ||
2122 !PID->getPropertyDecl()->isClassProperty()))
2125 if (PID->getPropertyDecl()->isClassProperty())
2126 ClassPropImpl = PID;
2131 return ClassPropImpl;
2146 void ObjCImplementationDecl::anchor() {}
2160 nameLoc, atStartLoc, superLoc,
2161 IvarLBraceLoc, IvarRBraceLoc);
2172 unsigned numInitializers) {
2173 if (numInitializers > 0) {
2174 NumIvarInitializers = numInitializers;
2176 memcpy(ivarInitializers, initializers,
2178 IvarInitializers = ivarInitializers;
2184 return IvarInitializers.get(
getASTContext().getExternalSource());
2197 void ObjCCompatibleAliasDecl::anchor() {}
2217 void ObjCPropertyDecl::anchor() {}
2268 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...
static ClassTemplateDecl * getDefinition(ClassTemplateDecl *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.
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.