14 #ifndef LLVM_CLANG_AST_DECLOBJC_H
15 #define LLVM_CLANG_AST_DECLOBJC_H
19 #include "llvm/ADT/STLExtras.h"
20 #include "llvm/Support/Compiler.h"
29 class ObjCProtocolDecl;
30 class ObjCCategoryDecl;
31 class ObjCPropertyDecl;
32 class ObjCPropertyImplDecl;
33 class CXXCtorInitializer;
49 void set(
void *
const* InList,
unsigned Elts,
ASTContext &Ctx);
69 assert(Idx <
NumElts &&
"Invalid access");
123 unsigned IsInstance : 1;
124 unsigned IsVariadic : 1;
127 unsigned IsPropertyAccessor : 1;
130 unsigned IsDefined : 1;
133 unsigned IsRedeclaration : 1;
136 mutable unsigned HasRedeclaration : 1;
140 unsigned DeclImplementation : 2;
144 unsigned objcDeclQualifier : 7;
147 unsigned RelatedResultType : 1;
151 unsigned SelLocsKind : 2;
160 unsigned IsOverriding : 1;
163 unsigned HasSkippedBody : 1;
173 void *ParamsAndSelLocs;
192 bool hasStandardSelLocs()
const {
198 SourceLocation *getStoredSelLocs() {
199 return reinterpret_cast<SourceLocation*
>(getParams() + NumParams);
201 const SourceLocation *getStoredSelLocs()
const {
202 return reinterpret_cast<const SourceLocation*
>(getParams() + NumParams);
207 ParmVarDecl **getParams() {
208 return reinterpret_cast<ParmVarDecl **
>(ParamsAndSelLocs);
210 const ParmVarDecl *
const *getParams()
const {
211 return reinterpret_cast<const ParmVarDecl *
const *
>(ParamsAndSelLocs);
216 unsigned getNumStoredSelLocs()
const {
217 if (hasStandardSelLocs())
222 void setParamsAndSelLocs(ASTContext &
C,
223 ArrayRef<ParmVarDecl*> Params,
224 ArrayRef<SourceLocation> SelLocs);
226 ObjCMethodDecl(SourceLocation beginLoc, SourceLocation endLoc,
227 Selector SelInfo, QualType T, TypeSourceInfo *ReturnTInfo,
230 bool isImplicitlyDeclared =
false,
bool isDefined =
false,
232 bool HasRelatedResultType =
false)
233 :
NamedDecl(ObjCMethod, contextDecl, beginLoc, SelInfo),
235 IsInstance(isInstance), IsVariadic(
isVariadic),
237 IsRedeclaration(0), HasRedeclaration(0), DeclImplementation(impControl),
239 RelatedResultType(HasRelatedResultType),
241 MethodDeclType(T), ReturnTInfo(ReturnTInfo), ParamsAndSelLocs(nullptr),
242 NumParams(0), DeclEndLoc(endLoc), Body(), SelfDecl(nullptr),
250 ObjCMethodDecl *getNextRedeclarationImpl()
override;
253 static ObjCMethodDecl *
254 Create(ASTContext &
C, SourceLocation beginLoc, SourceLocation endLoc,
255 Selector SelInfo, QualType T, TypeSourceInfo *ReturnTInfo,
258 bool isImplicitlyDeclared =
false,
bool isDefined =
false,
260 bool HasRelatedResultType =
false);
304 if (hasStandardSelLocs())
309 return getStoredSelLocs()[Index];
377 return llvm::makeArrayRef(const_cast<ParmVarDecl**>(getParams()),
389 typedef std::const_mem_fun_t<QualType, ParmVarDecl>
deref_fun;
390 typedef llvm::mapped_iterator<param_const_iterator, deref_fun>
409 bool &selfIsPseudoStrong,
bool &selfIsConsumed);
466 DeclImplementation = ic;
538 void anchor()
override;
544 unsigned Variance : 2;
560 Index(index), Variance(static_cast<unsigned>(variance)),
561 VarianceLoc(varianceLoc), ColonLoc(colonLoc) { }
583 Variance =
static_cast<unsigned>(variance);
617 struct PODSourceRange {
652 unsigned size()
const {
return NumParams; }
666 assert(
size() > 0 &&
"empty Objective-C type parameter list");
671 assert(
size() > 0 &&
"empty Objective-C type parameter list");
695 void anchor()
override;
711 typedef llvm::iterator_range<specific_decl_iterator<ObjCPropertyDecl>>
724 typedef llvm::iterator_range<specific_decl_iterator<ObjCMethodDecl>>
769 bool AllowHidden =
false)
const;
771 bool AllowHidden =
false)
const {
772 return getMethod(Sel,
true, AllowHidden);
775 return getMethod(Sel,
false, AllowHidden);
783 typedef llvm::DenseMap<IdentifierInfo*, ObjCPropertyDecl*>
PropertyMap;
785 typedef llvm::DenseMap<const ObjCProtocolDecl *, ObjCPropertyDecl*>
814 return K >= firstObjCContainer &&
815 K <= lastObjCContainer;
853 void anchor()
override;
857 mutable const Type *TypeForDecl;
860 struct DefinitionData {
887 mutable bool ExternallyCompleted : 1;
891 mutable bool IvarListMissingImplementation : 1;
895 bool HasDesignatedInitializers : 1;
897 enum InheritedDesignatedInitializersState {
907 mutable unsigned InheritedDesignatedInitializers : 2;
914 DefinitionData() : Definition(), SuperClassTInfo(), CategoryList(), IvarList(),
915 ExternallyCompleted(),
916 IvarListMissingImplementation(
true),
917 HasDesignatedInitializers(),
918 InheritedDesignatedInitializers(IDI_Unknown) { }
922 IdentifierInfo *Id, ObjCTypeParamList *typeParamList,
923 SourceLocation CLoc, ObjCInterfaceDecl *PrevDecl,
926 void LoadExternalDefinition()
const;
929 ObjCTypeParamList *TypeParamList;
936 llvm::PointerIntPair<DefinitionData *, 1, bool> Data;
938 DefinitionData &data()
const {
939 assert(Data.getPointer() &&
"Declaration has no definition!");
940 return *Data.getPointer();
944 void allocateDefinitionData();
946 typedef Redeclarable<ObjCInterfaceDecl> redeclarable_base;
947 ObjCInterfaceDecl *getNextRedeclarationImpl()
override {
950 ObjCInterfaceDecl *getPreviousDeclImpl()
override {
953 ObjCInterfaceDecl *getMostRecentDeclImpl()
override {
959 SourceLocation atLoc,
961 ObjCTypeParamList *typeParamList,
962 ObjCInterfaceDecl *PrevDecl,
963 SourceLocation ClassLoc = SourceLocation(),
964 bool isInternal =
false);
985 return TypeParamList;
1015 assert(
hasDefinition() &&
"Caller did not check for forward reference!");
1016 if (data().ExternallyCompleted)
1017 LoadExternalDefinition();
1019 return data().ReferencedProtocols;
1046 if (data().ExternallyCompleted)
1047 LoadExternalDefinition();
1049 return data().ReferencedProtocols.begin();
1056 if (data().ExternallyCompleted)
1057 LoadExternalDefinition();
1059 return data().ReferencedProtocols.end();
1073 if (data().ExternallyCompleted)
1074 LoadExternalDefinition();
1076 return data().ReferencedProtocols.loc_begin();
1084 if (data().ExternallyCompleted)
1085 LoadExternalDefinition();
1087 return data().ReferencedProtocols.loc_end();
1102 if (data().ExternallyCompleted)
1103 LoadExternalDefinition();
1105 return data().AllReferencedProtocols.empty()
1107 : data().AllReferencedProtocols.begin();
1114 if (data().ExternallyCompleted)
1115 LoadExternalDefinition();
1117 return data().AllReferencedProtocols.empty()
1119 : data().AllReferencedProtocols.end();
1123 typedef llvm::iterator_range<specific_decl_iterator<ObjCIvarDecl>>
ivar_range;
1159 data().ReferencedProtocols.set(List, Num, Locs, C);
1205 if (!Data.getOpaqueValue()) {
1207 if (II->isOutOfDate()) {
1213 return Data.getPointer();
1220 return hasDefinition()? Data.getPointer()->Definition :
nullptr;
1227 return hasDefinition()? Data.getPointer()->Definition :
nullptr;
1248 if (data().ExternallyCompleted)
1249 LoadExternalDefinition();
1251 return data().SuperClassTInfo;
1259 data().SuperClassTInfo = superClass;
1267 template<
bool (*Filter)(ObjCCategoryDecl *)>
1271 void findAcceptableCategory();
1284 findAcceptableCategory();
1300 return X.Current == Y.Current;
1305 return X.Current != Y.Current;
1318 typedef filtered_category_iterator<isVisibleCategory>
1321 typedef llvm::iterator_range<visible_categories_iterator>
1355 typedef llvm::iterator_range<known_categories_iterator>
1388 typedef filtered_category_iterator<isVisibleExtension>
1391 typedef llvm::iterator_range<visible_extensions_iterator>
1423 typedef filtered_category_iterator<isKnownExtension>
1425 typedef llvm::iterator_range<known_extensions_iterator>
1456 if (data().ExternallyCompleted)
1457 LoadExternalDefinition();
1459 return data().CategoryList;
1465 data().CategoryList = category;
1478 while (I !=
nullptr) {
1508 bool shallowCategoryLookup =
false,
1509 bool followSuper =
true,
1525 bool Instance=
true)
const;
1546 return data().EndLoc;
1565 bool lookupCategory,
1566 bool RHSIsQualifiedID =
false);
1594 bool inheritsDesignatedInitializers()
const;
1613 void anchor()
override;
1625 :
FieldDecl(ObjCIvar, DC, StartLoc, IdLoc, Id, T, TInfo, BW,
1627 NextIvar(nullptr), DeclAccess(ac), Synthesized(synthesized) {}
1630 static ObjCIvarDecl *
Create(ASTContext &
C, ObjCContainerDecl *DC,
1631 SourceLocation StartLoc, SourceLocation IdLoc,
1632 IdentifierInfo *Id, QualType T,
1633 TypeSourceInfo *TInfo,
1635 bool synthesized=
false);
1673 unsigned DeclAccess : 3;
1674 unsigned Synthesized : 1;
1680 void anchor()
override;
1684 :
FieldDecl(ObjCAtDefsField, DC, StartLoc, IdLoc, Id, T,
1733 void anchor()
override;
1735 struct DefinitionData {
1748 llvm::PointerIntPair<DefinitionData *, 1, bool> Data;
1750 DefinitionData &data()
const {
1751 assert(Data.getPointer() &&
"Objective-C protocol has no definition!");
1752 return *Data.getPointer();
1759 void allocateDefinitionData();
1783 return data().ReferencedProtocols;
1795 return data().ReferencedProtocols.begin();
1801 return data().ReferencedProtocols.end();
1813 return data().ReferencedProtocols.loc_begin();
1819 return data().ReferencedProtocols.loc_end();
1825 return data().ReferencedProtocols.size();
1833 data().ReferencedProtocols.set(List, Num, Locs, C);
1854 if (!Data.getOpaqueValue()) {
1856 if (II->isOutOfDate()) {
1862 return Data.getPointer();
1867 return hasDefinition()? Data.getPointer()->Definition :
nullptr;
1872 return hasDefinition()? Data.getPointer()->Definition :
nullptr;
1940 void anchor()
override;
2003 ReferencedProtocols.
set(List, Num, Locs, C);
2007 return ReferencedProtocols;
2017 return ReferencedProtocols.
begin();
2031 return ReferencedProtocols.
loc_end();
2039 return NextClassCategory;
2045 typedef llvm::iterator_range<specific_decl_iterator<ObjCIvarDecl>>
ivar_range;
2077 void anchor()
override;
2089 nameLoc, atStartLoc),
2090 ClassInterface(classInterface) {}
2115 typedef llvm::iterator_range<specific_decl_iterator<ObjCPropertyImplDecl>>
2130 return K >= firstObjCImpl && K <= lastObjCImpl;
2148 void anchor()
override;
2160 :
ObjCImplDecl(ObjCCategoryImpl, DC, classInterface, nameLoc, atStartLoc),
2161 Id(Id), CategoryNameLoc(CategoryNameLoc) {}
2229 void anchor()
override;
2241 unsigned NumIvarInitializers;
2245 bool HasNonZeroConstructors : 1;
2248 bool HasDestructors : 1;
2257 :
ObjCImplDecl(ObjCImplementation, DC, classInterface, nameLoc, atStartLoc),
2258 SuperClass(superDecl), SuperLoc(superLoc), IvarLBraceLoc(IvarLBraceLoc),
2259 IvarRBraceLoc(IvarRBraceLoc),
2260 IvarInitializers(
nullptr), NumIvarInitializers(0),
2261 HasNonZeroConstructors(
false), HasDestructors(
false) {}
2290 const auto *ConstThis =
this;
2306 return NumIvarInitializers;
2310 NumIvarInitializers = numNumIvarInitializers;
2315 unsigned numInitializers);
2339 assert(
getIdentifier() &&
"Name is not a simple identifier");
2366 typedef llvm::iterator_range<specific_decl_iterator<ObjCIvarDecl>>
ivar_range;
2394 void anchor()
override;
2400 :
NamedDecl(ObjCCompatibleAlias, DC, L, Id), AliasedClass(aliasedClass) {}
2425 void anchor()
override;
2463 unsigned PropertyImplementation : 2;
2476 :
NamedDecl(ObjCProperty, DC, L, Id), AtLoc(AtLocation),
2477 LParenLoc(LParenLocation), DeclType(T), DeclTypeSourceInfo(TSI),
2480 PropertyImplementation(propControl),
2483 GetterMethodDecl(nullptr), SetterMethodDecl(nullptr),
2484 PropertyIvarDecl(nullptr) {}
2489 IdentifierInfo *Id, SourceLocation AtLocation,
2490 SourceLocation LParenLocation,
2492 TypeSourceInfo *TSI,
2509 DeclTypeSourceInfo = TSI;
2520 PropertyAttributes |= PRVal;
2534 PropertyAttributesAsWritten = PRVal;
2556 return (PropertyAttributes &
2589 PropertyImplementation = pc;
2596 PropertyIvarDecl = Ivar;
2599 return PropertyIvarDecl;
2646 Expr *GetterCXXConstructor;
2650 Expr *SetterCXXAssignment;
2657 :
Decl(ObjCPropertyImpl, DC, L), AtLoc(atLoc),
2658 IvarLoc(ivarLoc), PropertyDecl(property), PropertyIvarDecl(ivarDecl),
2659 GetterCXXConstructor(nullptr), SetterCXXAssignment(nullptr) {
2660 assert (PK ==
Dynamic || PropertyIvarDecl);
2665 SourceLocation atLoc, SourceLocation L,
2666 ObjCPropertyDecl *property,
2668 ObjCIvarDecl *ivarDecl,
2669 SourceLocation ivarLoc);
2679 return PropertyDecl;
2688 return PropertyIvarDecl;
2694 PropertyIvarDecl = Ivar;
2695 this->IvarLoc = IvarLoc;
2710 return GetterCXXConstructor;
2713 GetterCXXConstructor = getterCXXConstructor;
2717 return SetterCXXAssignment;
2720 SetterCXXAssignment = setterCXXAssignment;
2729 template<
bool (*Filter)(ObjCCategoryDecl *)>
2737 template<
bool (*Filter)(ObjCCategoryDecl *)>
2738 inline ObjCInterfaceDecl::filtered_category_iterator<Filter> &
2741 findAcceptableCategory();
2753 inline bool ObjCInterfaceDecl::isKnownExtension(ObjCCategoryDecl *Cat) {
2754 return Cat->IsClassExtension();
StringRef getObjCRuntimeNameAsString() const
param_const_range params() const
ObjCMethodDecl * getCategoryMethod(Selector Sel, bool isInstance) const
param_const_iterator param_begin() const
void setMethodParams(ASTContext &C, ArrayRef< ParmVarDecl * > Params, ArrayRef< SourceLocation > SelLocs=llvm::None)
Sets the method's parameters and selector source locations. If the method is implicit (not coming fro...
void setCategoryNameLoc(SourceLocation Loc)
bool hasDefinition() const
Determine whether this class has been defined.
bool isAtomic() const
isAtomic - Return true if the property is atomic.
For nullary selectors, immediately before the end: "[foo release]" / "-(void)release;" Or with a spac...
ObjCMethodDecl * lookupPrivateClassMethod(const Selector &Sel)
void setExternallyCompleted()
Indicate that this Objective-C class is complete, but that the external AST source will be responsibl...
void setImplicit(bool I=true)
llvm::iterator_range< protocol_loc_iterator > protocol_loc_range
classmeth_iterator classmeth_end() const
void setEndOfDefinitionLoc(SourceLocation LE)
IdentifierInfo * getIdentifier() const
void updateOutOfDate(IdentifierInfo &II) const
Update a potentially out-of-date declaration.
protocol_range protocols() const
Smart pointer class that efficiently represents Objective-C method names.
redeclarable_base::redecl_range redecl_range
static ObjCIvarDecl * CreateDeserialized(ASTContext &C, unsigned ID)
ImplementationControl getImplementationControl() const
static bool classof(const Decl *D)
propimpl_iterator propimpl_begin() const
visible_categories_iterator visible_categories_end() const
Retrieve an iterator to the end of the visible-categories list.
ObjCInterfaceDecl * getClassInterface()
const ObjCInterfaceDecl * isObjCRequiresPropertyDefs() const
ObjCInterfaceDecl * getClassInterface()
void setOverriding(bool isOverriding)
void startDefinition()
Starts the definition of this Objective-C class, taking it from a forward declaration (@class) to a d...
redeclarable_base::redecl_iterator redecl_iterator
ObjCMethodDecl * getCategoryClassMethod(Selector Sel) const
void getOverriddenMethods(SmallVectorImpl< const ObjCMethodDecl * > &Overridden) const
Return overridden methods for the given Method.
void setLParenLoc(SourceLocation L)
static bool classof(const Decl *D)
protocol_iterator protocol_end() const
ObjCMethodDecl * lookupClassMethod(Selector Sel) const
IdentifierInfo * getIdentifier() const
void gatherDefaultTypeArgs(SmallVectorImpl< QualType > &typeArgs) const
protocol_loc_iterator protocol_loc_end() const
PropertyControl getPropertyImplementation() const
const SourceLocation * loc_iterator
ivar_iterator ivar_end() const
bool isThisDeclarationADefinition() const
Determine whether this particular declaration of this class is actually also a definition.
llvm::iterator_range< protocol_iterator > protocol_range
CXXCtorInitializer *const * init_const_iterator
init_const_iterator - Iterates through the ivar initializer list.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
llvm::iterator_range< specific_decl_iterator< ObjCIvarDecl > > ivar_range
std::const_mem_fun_t< QualType, ParmVarDecl > deref_fun
void setTypeForDecl(const Type *TD) const
NamedDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N)
ObjCProtocolList::loc_iterator protocol_loc_iterator
static ObjCProtocolDecl * Create(ASTContext &C, DeclContext *DC, IdentifierInfo *Id, SourceLocation nameLoc, SourceLocation atStartLoc, ObjCProtocolDecl *PrevDecl)
static bool classofKind(Kind K)
specific_decl_iterator< ObjCIvarDecl > ivar_iterator
const ObjCIvarDecl * all_declared_ivar_begin() const
static ObjCPropertyDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, SourceLocation AtLocation, SourceLocation LParenLocation, QualType T, TypeSourceInfo *TSI, PropertyControl propControl=None)
ObjCInterfaceDecl * getClassInterface()
void setNumIvarInitializers(unsigned numNumIvarInitializers)
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)
known_extensions_iterator known_extensions_end() const
Retrieve an iterator to the end of the known-extensions list.
SourceLocation getDeclaratorEndLoc() const
Returns the location where the declarator ends. It will be the location of ';' for a method declarati...
ObjCCategoryDecl * getNextClassCategory() const
llvm::iterator_range< classmeth_iterator > classmeth_range
std::ptrdiff_t difference_type
instmeth_iterator instmeth_begin() const
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
protocol_loc_iterator protocol_loc_begin() const
ObjCMethodDecl * lookupInstanceMethod(Selector Sel) const
void setPropertyImplementation(PropertyControl pc)
void setPropertyIvarDecl(ObjCIvarDecl *Ivar, SourceLocation IvarLoc)
static bool classofKind(Kind K)
A container of type source information.
static ObjCMethodDecl * castFromDeclContext(const DeclContext *DC)
bool isArcWeakrefUnavailable() const
bool isBlockPointerType() const
void setPropertyAccessor(bool isAccessor)
protocol_range protocols() const
ObjCProtocolList::iterator protocol_iterator
Iterates over a filtered subrange of declarations stored in a DeclContext.
static bool classof(const Decl *D)
void createImplicitParams(ASTContext &Context, const ObjCInterfaceDecl *ID)
static bool classofKind(Decl::Kind K)
const ObjCPropertyDecl * findPropertyDecl(bool CheckOverrides=true) const
Returns the property associated with this method's selector.
ObjCMethodDecl * getMethod(Selector Sel, bool isInstance, bool AllowHidden=false) const
protocol_loc_iterator protocol_loc_begin() const
ObjCTypeParamVariance getVariance() const
Determine the variance of this type parameter.
static bool classofKind(Kind K)
const Type * getTypeForDecl() const
void setImplementation(ObjCCategoryImplDecl *ImplD)
visible_categories_range visible_categories() const
llvm::iterator_range< param_const_iterator > param_const_range
Expr * getSetterCXXAssignment() const
unsigned getIndex() const
Retrieve the index into its type parameter list.
SourceLocation getIvarRBraceLoc() const
QualType getUsageType(QualType objectType) const
SourceLocation getLocStart() const LLVM_READONLY
static bool classof(const Decl *D)
llvm::DenseMap< const ObjCProtocolDecl *, ObjCPropertyDecl * > ProtocolPropertyMap
TypeSourceInfo * getSuperClassTInfo() const
static bool classofKind(Kind K)
SourceRange getReturnTypeSourceRange() const
bool ClassImplementsProtocol(ObjCProtocolDecl *lProto, bool lookupCategory, bool RHSIsQualifiedID=false)
ObjCPropertyDecl * FindPropertyVisibleInPrimaryClass(IdentifierInfo *PropertyId) const
decl_iterator decls_end() const
void setSelfDecl(ImplicitParamDecl *SD)
llvm::iterator_range< protocol_loc_iterator > protocol_loc_range
void getSelectorLocs(SmallVectorImpl< SourceLocation > &SelLocs) const
const ObjCProtocolDecl * getDefinition() const
Retrieve the definition of this protocol, if any.
unsigned param_size() const
unsigned size() const
Determine the number of type parameters in this list.
ParmVarDecl - Represents a parameter to a function.
IdentifierInfo * getIdentifier() const
TypeSourceInfo * getTypeSourceInfo() const
static DeclContext * castToDeclContext(const ObjCMethodDecl *D)
known_categories_iterator known_categories_begin() const
Retrieve an iterator to the beginning of the known-categories list.
Kind getPropertyImplementation() const
unsigned ivar_size() const
ObjCProtocolList::iterator protocol_iterator
ObjCTypeParamList * getTypeParamListAsWritten() const
specific_decl_iterator< ObjCIvarDecl > ivar_iterator
bool visible_categories_empty() const
Determine whether the visible-categories list is empty.
Provides common interface for the Decls that can be redeclared.
ObjCProtocolDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this Objective-C protocol.
param_const_iterator sel_param_end() const
const ObjCInterfaceDecl * getClassInterface() const
SourceLocation getSelectorStartLoc() const
param_type_iterator param_type_end() const
const ObjCInterfaceDecl * getContainingInterface() const
Return the class interface that this ivar is logically contained in; this is either the interface whe...
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
ObjCMethodFamily
A family of Objective-C methods.
ObjCIvarDecl * getIvarDecl(IdentifierInfo *Id) const
protocol_loc_range protocol_locs() const
void set(T *const *InList, unsigned Elts, ASTContext &Ctx)
protocol_iterator protocol_begin() const
static SourceLocation getFromRawEncoding(unsigned Encoding)
Turn a raw encoding of a SourceLocation object into a real SourceLocation.
bool isOverriding() const
Whether this method overrides any other in the class hierarchy.
std::string getNameAsString() const
Get the name of the class associated with this interface.
void setTypeParamList(ObjCTypeParamList *TPL)
ObjCImplDecl(Kind DK, DeclContext *DC, ObjCInterfaceDecl *classInterface, SourceLocation nameLoc, SourceLocation atStartLoc)
ImplicitParamDecl * getCmdDecl() const
all_protocol_range all_referenced_protocols() const
redecl_iterator redecls_begin() const
void setSuperClass(TypeSourceInfo *superClass)
ObjCMethodDecl * getClassMethod(Selector Sel, bool AllowHidden=false) const
method_range methods() const
static bool classofKind(Kind K)
void setReturnType(QualType T)
void startDefinition()
Starts the definition of this Objective-C protocol.
bool hasSkippedBody() const
True if the method was a definition but its body was skipped.
static bool classof(const Decl *D)
static bool classof(const Decl *D)
void setDeclImplementation(ImplementationControl ic)
static ObjCContainerDecl * castFromDeclContext(const DeclContext *DC)
SourceLocation getCategoryNameLoc() const
void set(ObjCProtocolDecl *const *InList, unsigned Elts, const SourceLocation *Locs, ASTContext &Ctx)
SourceLocation getColonLoc() const
bool IsClassExtension() const
void collectPropertiesToImplement(PropertyMap &PM, PropertyDeclOrder &PO) const override
bool isThisDeclarationADefinition() const
Returns whether this specific method is a definition.
SourceLocation getSelectorLoc(unsigned Index) const
ObjCInterfaceDecl * getNextRedeclaration() const
SelectorLocationsKind
Whether all locations of the selector identifiers are in a "standard" position.
ObjCTypeParamDecl * AlignmentHack
unsigned getNumSelectorLocs() const
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)
void setAccessControl(AccessControl ac)
protocol_loc_range protocol_locs() const
ObjCTypeParamList * getTypeParamList() const
void setAtLoc(SourceLocation L)
SourceLocation getIvarLBraceLoc() const
SourceLocation getSuperClassLoc() const
Retrieve the starting location of the superclass.
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())
ObjCMethodFamily getMethodFamily() const
Determines the family of this method.
static ObjCPropertyImplDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation atLoc, SourceLocation L, ObjCPropertyDecl *property, Kind PK, ObjCIvarDecl *ivarDecl, SourceLocation ivarLoc)
protocol_iterator protocol_end() const
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
ObjCContainerDecl(Kind DK, DeclContext *DC, IdentifierInfo *Id, SourceLocation nameLoc, SourceLocation atStartLoc)
ObjCPropertyImplDecl * FindPropertyImplIvarDecl(IdentifierInfo *ivarId) const
void setSuperClass(ObjCInterfaceDecl *superCls)
bool hasDesignatedInitializers() const
static ObjCTypeParamList * create(ASTContext &ctx, SourceLocation lAngleLoc, ArrayRef< ObjCTypeParamDecl * > typeParams, SourceLocation rAngleLoc)
Create a new Objective-C type parameter list.
llvm::iterator_range< init_const_iterator > init_const_range
Expr * getGetterCXXConstructor() const
static ObjCAtDefsFieldDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, QualType T, Expr *BW)
const ObjCIvarDecl * getNextIvar() const
static ObjCCategoryImplDecl * CreateDeserialized(ASTContext &C, unsigned ID)
void setLazyBody(uint64_t Offset)
Selector getSetterName() const
llvm::iterator_range< param_iterator > param_range
void setClassInterface(ObjCInterfaceDecl *D)
void setIdentifier(IdentifierInfo *II)
bool isDesignatedInitializerForTheInterface(const ObjCMethodDecl **InitMethod=nullptr) const
ObjCProtocolDecl * getDefinition()
Retrieve the definition of this protocol, if any.
bool declaresSameEntity(const Decl *D1, const Decl *D2)
Determine whether two declarations declare the same entity.
filtered_category_iterator()
llvm::iterator_range< specific_decl_iterator< ObjCIvarDecl > > ivar_range
void setAsRedeclaration(const ObjCMethodDecl *PrevMethod)
CompoundStmt * getCompoundBody()
Represents an Objective-C protocol declaration.
filtered_category_iterator operator++(int)
ObjCInterfaceDecl * getSuperClass()
void setProtocolList(ObjCProtocolDecl *const *List, unsigned Num, const SourceLocation *Locs, ASTContext &C)
void addInstanceMethod(ObjCMethodDecl *method)
Represents an ObjC class declaration.
SourceLocation getLocEnd() const LLVM_READONLY
propimpl_range property_impls() const
llvm::DenseMap< IdentifierInfo *, ObjCPropertyDecl * > PropertyMap
decl_iterator decls_begin() const
Number of bits fitting all the property attributes.
PropertyAttributeKind getPropertyAttributes() const
ObjCInterfaceDecl * getClassInterface()
known_categories_range known_categories() const
specific_decl_iterator< ObjCPropertyImplDecl > propimpl_iterator
CXXCtorInitializer ** init_iterator
init_iterator - Iterates through the ivar initializer list.
const ObjCProtocolDecl * getCanonicalDecl() const
ObjCMethodDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
specific_decl_iterator< ObjCMethodDecl > method_iterator
bool hasExplicitBound() const
SourceLocation getIvarLBraceLoc() const
ObjCMethodDecl * lookupPrivateMethod(const Selector &Sel, bool Instance=true) const
Lookup a method in the classes implementation hierarchy.
SourceLocation getAtStartLoc() const
void setGetterCXXConstructor(Expr *getterCXXConstructor)
Iterator that walks over the list of categories, filtering out those that do not meet specific criter...
static ObjCPropertyDecl * findPropertyDecl(const DeclContext *DC, const IdentifierInfo *propertyID)
Lookup a property by name in the specified DeclContext.
SourceLocation getAtLoc() const
filtered_category_iterator< isKnownCategory > known_categories_iterator
Iterator that walks over all of the known categories and extensions, including those that are hidden...
SourceRange getAtEndRange() const
void setVariadic(bool isVar)
llvm::iterator_range< redecl_iterator > redecl_range
bool isThisDeclarationADefinition() const
Determine whether this particular declaration is also the definition.
SourceLocation getLocStart() const LLVM_READONLY
const ParmVarDecl *const * param_const_iterator
visible_categories_iterator visible_categories_begin() const
Retrieve an iterator to the beginning of the visible-categories list.
method_iterator meth_end() const
bool isRetaining() const
isRetaining - Return true if the property retains its value.
ObjCProtocolDecl * lookupProtocolNamed(IdentifierInfo *PName)
void setHasDestructors(bool val)
static ObjCCompatibleAliasDecl * CreateDeserialized(ASTContext &C, unsigned ID)
bool isThisDeclarationADesignatedInitializer() const
ObjCProtocolList::loc_iterator protocol_loc_iterator
protocol_loc_iterator protocol_loc_begin() const
ObjCDeclQualifier getObjCDeclQualifier() const
void setTypeParamList(ObjCTypeParamList *TPL)
void setIvarRBraceLoc(SourceLocation Loc)
SourceLocation getSuperClassLoc() const
filtered_category_iterator< isKnownExtension > known_extensions_iterator
Iterator that walks over all of the known extensions.
ID
Defines the set of possible language-specific address spaces.
bool isUnarySelector() const
static bool classofKind(Kind K)
void setNextIvar(ObjCIvarDecl *ivar)
void setSynthesize(bool synth)
FieldDecl(Kind DK, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, Expr *BW, bool Mutable, InClassInitStyle InitStyle)
visible_extensions_iterator visible_extensions_begin() const
Retrieve an iterator to the beginning of the visible-extensions list.
void setType(QualType T, TypeSourceInfo *TSI)
bool hasDestructors() const
SourceLocation getVarianceLoc() const
Retrieve the location of the variance keyword.
filtered_category_iterator< isVisibleExtension > visible_extensions_iterator
Iterator that walks over all of the visible extensions, skipping any that are known but hidden...
void setGetterMethodDecl(ObjCMethodDecl *gDecl)
ObjCCategoryDecl * getCategoryListRaw() const
Retrieve the raw pointer to the start of the category/extension list.
TypedefNameDecl(Kind DK, ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, TypeSourceInfo *TInfo)
StringRef getName() const
Return the actual identifier string.
StringRef getObjCRuntimeNameAsString() const
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)
static bool classof(const Decl *D)
unsigned getNumArgs() const
SetterKind getSetterKind() const
StringRef getObjCRuntimeNameAsString() const
void setSetterMethodDecl(ObjCMethodDecl *gDecl)
static bool classof(const Decl *D)
ObjCIvarDecl * getPropertyIvarDecl() const
protocol_iterator protocol_begin() const
param_iterator param_end()
llvm::iterator_range< visible_categories_iterator > visible_categories_range
void setAtEndRange(SourceRange atEnd)
ObjCMethodDecl * lookupInstanceMethod(Selector Sel) const
Lookup an instance method for a given selector.
prop_iterator prop_end() const
llvm::iterator_range< known_categories_iterator > known_categories_range
static ObjCTypeParamDecl * Create(ASTContext &ctx, DeclContext *dc, ObjCTypeParamVariance variance, SourceLocation varianceLoc, unsigned index, SourceLocation nameLoc, IdentifierInfo *name, SourceLocation colonLoc, TypeSourceInfo *boundInfo)
bool isFirstDecl() const
True if this is the first declaration in its redeclaration chain.
ObjCMethodDecl * lookupClassMethod(Selector Sel) const
Lookup a class method for a given selector.
void addClassMethod(ObjCMethodDecl *method)
ParmVarDecl *const * param_iterator
void setGetterName(Selector Sel)
ImplicitParamDecl * getSelfDecl() const
protocol_iterator protocol_begin() const
void setDefined(bool isDefined)
classmeth_iterator classmeth_begin() const
ObjCTypeParamDecl * back() const
void setImplementation(ObjCImplementationDecl *ImplD)
void mergeClassExtensionProtocolList(ObjCProtocolDecl *const *List, unsigned Num, ASTContext &C)
ObjCIvarDecl * lookupInstanceVariable(IdentifierInfo *IVarName, ObjCInterfaceDecl *&ClassDeclared)
bool hasRelatedResultType() const
Determine whether this method has a result type that is related to the message receiver's type...
bool isInstanceMethod() const
static bool classofKind(Kind K)
SourceLocation getRAngleLoc() const
static bool classof(const Decl *D)
virtual void collectPropertiesToImplement(PropertyMap &PM, PropertyDeclOrder &PO) const
instmeth_iterator instmeth_end() const
void getDesignatedInitializers(llvm::SmallVectorImpl< const ObjCMethodDecl * > &Methods) const
DeclarationName getDeclName() const
static DeclContext * castToDeclContext(const ObjCContainerDecl *D)
protocol_loc_range protocol_locs() const
static bool classof(const Decl *D)
void setIvarRBraceLoc(SourceLocation Loc)
llvm::iterator_range< specific_decl_iterator< ObjCPropertyImplDecl > > propimpl_range
unsigned ivar_size() const
bool declaresOrInheritsDesignatedInitializers() const
static ObjCTypeParamDecl * CreateDeserialized(ASTContext &ctx, unsigned ID)
llvm::iterator_range< specific_decl_iterator< ObjCPropertyDecl > > prop_range
ObjCTypeParamVariance
Describes the variance of a given generic parameter.
void setHasSkippedBody(bool Skipped=true)
static ObjCMethodDecl * CreateDeserialized(ASTContext &C, unsigned ID)
init_const_range inits() const
TypeSourceInfo * getReturnTypeSourceInfo() const
AccessControl getCanonicalAccessControl() const
ObjCMethodDecl * lookupMethod(Selector Sel, bool isInstance) const
ObjCInterfaceDecl * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
init_iterator init_begin()
init_begin() - Retrieve an iterator to the first initializer.
llvm::iterator_range< specific_decl_iterator< ObjCMethodDecl > > method_range
filtered_category_iterator(ObjCCategoryDecl *Current)
ivar_iterator ivar_begin() const
ivar_iterator ivar_begin() const
ObjCCategoryDecl * getCategoryDecl() const
param_const_iterator param_end() const
filtered_decl_iterator< ObjCMethodDecl,&ObjCMethodDecl::isClassMethod > classmeth_iterator
bool isClassMethod() const
std::input_iterator_tag iterator_category
PODSourceRange Brackets
Location of the left and right angle brackets.
ArrayRef< ParmVarDecl * > parameters() const
ivar_iterator ivar_end() const
const ObjCMethodDecl * getCanonicalDecl() const
T * operator[](unsigned Idx) const
static ObjCCompatibleAliasDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, ObjCInterfaceDecl *aliasedClass)
ObjCPropertyImplDecl * FindPropertyImplDecl(IdentifierInfo *propertyId) const
redecl_range redecls() const
Returns an iterator range for all the redeclarations of the same decl. It will iterate at least once ...
static ObjCProtocolDecl * CreateDeserialized(ASTContext &C, unsigned ID)
QualType getSelfType(ASTContext &Context, const ObjCInterfaceDecl *OID, bool &selfIsPseudoStrong, bool &selfIsConsumed)
filtered_decl_iterator< ObjCMethodDecl,&ObjCMethodDecl::isInstanceMethod > instmeth_iterator
ObjCInterfaceDecl * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first declaration.
bool isDesignatedInitializer(Selector Sel, const ObjCMethodDecl **InitMethod=nullptr) const
pointer operator->() const
QualType getUsageType(QualType objectType) const
Encodes a location in the source. The SourceManager can decode this to get at the full include stack...
llvm::iterator_range< protocol_iterator > protocol_range
unsigned protocol_size() const
bool visible_extensions_empty() const
Determine whether the visible-extensions list is empty.
StringRef getName() const
llvm::iterator_range< init_iterator > init_range
void setIvarLBraceLoc(SourceLocation Loc)
bool isRedeclaration() const
True if this is a method redeclaration in the same interface.
const ObjCInterfaceDecl * getClassInterface() const
void setAtStartLoc(SourceLocation Loc)
ivar_iterator ivar_end() const
static bool classof(const Decl *D)
bool isValid() const
Return true if this is a valid SourceLocation object.
void setObjCDeclQualifier(ObjCDeclQualifier QV)
redeclarable_base::redecl_iterator redecl_iterator
void setPropertyAttributesAsWritten(PropertyAttributeKind PRVal)
ObjCCategoryDecl * getNextClassCategoryRaw() const
Retrieve the pointer to the next stored category (or extension), which may be hidden.
Stmt * getBody() const override
Retrieve the body of this method, if it has one.
ivar_iterator ivar_begin() const
bool getSynthesize() const
bool hasWrittenStorageAttribute() const
redecl_iterator redecls_end() const
reference operator*() const
void setProtocolList(ObjCProtocolDecl *const *List, unsigned Num, const SourceLocation *Locs, ASTContext &C)
all_protocol_iterator all_referenced_protocol_end() const
const_iterator begin() const
ObjCInterfaceDecl * lookupInheritedClass(const IdentifierInfo *ICName)
const ObjCInterfaceDecl * getClassInterface() const
llvm::iterator_range< instmeth_iterator > instmeth_range
bool isPropertyAccessor() const
init_iterator init_end()
init_end() - Retrieve an iterator past the last initializer.
Represents one property declaration in an Objective-C interface.
void setProtocolList(ObjCProtocolDecl *const *List, unsigned Num, const SourceLocation *Locs, ASTContext &C)
filtered_category_iterator< isVisibleCategory > visible_categories_iterator
Iterator that walks over the list of categories and extensions that are visible, i.e., not hidden in a non-imported submodule.
ObjCTypeParamDecl ** iterator
Iterate through the type parameters in the list.
void collectInheritedProtocolProperties(const ObjCPropertyDecl *Property, ProtocolPropertyMap &PM) const
loc_iterator loc_begin() const
QualType getReturnType() const
llvm::iterator_range< specific_decl_iterator< ObjCIvarDecl > > ivar_range
llvm::iterator_range< all_protocol_iterator > all_protocol_range
prop_iterator prop_begin() const
const ObjCInterfaceDecl * getDefinition() const
Retrieve the definition of this class, or NULL if this class has been forward-declared (with @class) ...
ObjCTypeParamDecl *const * const_iterator
SourceLocation getLAngleLoc() const
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
SourceLocation getCategoryNameLoc() const
SourceLocation getLParenLoc() const
specific_decl_iterator< ObjCPropertyDecl > prop_iterator
llvm::SmallVector< ObjCPropertyDecl *, 8 > PropertyDeclOrder
void setSetterCXXAssignment(Expr *setterCXXAssignment)
ObjCIvarDecl * getNextIvar()
bool isSuperClassOf(const ObjCInterfaceDecl *I) const
known_extensions_iterator known_extensions_begin() const
Retrieve an iterator to the beginning of the known-extensions list.
Base class for declarations which introduce a typedef-name.
void setPropertyDecl(ObjCPropertyDecl *Prop)
const ObjCProtocolList & getReferencedProtocols() const
ObjCProtocolList::loc_iterator protocol_loc_iterator
instmeth_range instance_methods() const
static bool classofKind(Kind K)
Selector getObjCSelector() const
param_iterator param_begin()
ObjCCategoryDecl * FindCategoryDeclaration(IdentifierInfo *CategoryId) const
static bool classofKind(Kind K)
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. It also returns 'true' if one of its categories has declared a 'readwrite' property. This is because, user must provide a setter method for the category's 'readwrite' property.
static bool classof(const Decl *D)
ObjCCategoryImplDecl * getImplementation() const
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
protocol_loc_iterator protocol_loc_end() const
prop_range properties() const
std::string getNameAsString() const
Get the name of the class associated with this interface.
ObjCIvarDecl * getPropertyIvarDecl() const
ObjCMethodDecl * getInstanceMethod(Selector Sel, bool AllowHidden=false) const
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
protocol_loc_iterator protocol_loc_end() const
bool isValid() const
Whether this pointer is non-NULL.
Reads an AST files chain containing the contents of a translation unit.
ObjCInterfaceDecl * getDefinition()
Retrieve the definition of this class, or NULL if this class has been forward-declared (with @class) ...
void setIvarList(ObjCIvarDecl *ivar)
SourceLocation getPropertyIvarDeclLoc() const
filtered_category_iterator & operator++()
specific_decl_iterator< ObjCIvarDecl > ivar_iterator
Selector getGetterName() const
bool hasDefinition() const
Determine whether this protocol has a definition.
static ObjCImplementationDecl * Create(ASTContext &C, DeclContext *DC, ObjCInterfaceDecl *classInterface, ObjCInterfaceDecl *superDecl, SourceLocation nameLoc, SourceLocation atStartLoc, SourceLocation superLoc=SourceLocation(), SourceLocation IvarLBraceLoc=SourceLocation(), SourceLocation IvarRBraceLoc=SourceLocation())
void makeitReadWriteAttribute()
init_const_iterator init_end() const
end() - Retrieve an iterator past the last initializer.
static ObjCCategoryDecl * CreateDeserialized(ASTContext &C, unsigned ID)
loc_iterator loc_end() const
Selector getSelector() const
friend bool operator!=(filtered_category_iterator X, filtered_category_iterator Y)
static bool classofKind(Kind K)
ObjCTypeParamDecl * front() const
SourceLocation getEndOfDefinitionLoc() const
ObjCMethodDecl * getCategoryInstanceMethod(Selector Sel) const
visible_extensions_iterator visible_extensions_end() const
Retrieve an iterator to the end of the visible-extensions list.
known_extensions_range known_extensions() const
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)
ObjCMethodDecl * getGetterMethodDecl() const
bool hasNonZeroConstructors() const
ObjCMethodDecl * lookupMethod(Selector Sel, bool isInstance, bool shallowCategoryLookup=false, bool followSuper=true, const ObjCCategoryDecl *C=nullptr) const
bool known_extensions_empty() const
Determine whether the known-extensions list is empty.
void setHasNonZeroConstructors(bool val)
ObjCTypeParamList * getTypeParamList() const
Represents a C++ base or member initializer.
unsigned ivar_size() const
ObjCMethodDecl * getSetterMethodDecl() const
SourceLocation getStandardSelectorLoc(unsigned Index, Selector Sel, bool WithArgSpace, ArrayRef< Expr * > Args, SourceLocation EndLoc)
Get the "standard" location of a selector identifier, e.g: For nullary selectors, immediately before ']': "[foo release]".
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
ObjCProtocolList::iterator protocol_iterator
friend bool operator==(filtered_category_iterator X, filtered_category_iterator Y)
bool hasBody() const override
Determine whether this method has a body.
llvm::iterator_range< protocol_iterator > protocol_range
ObjCPropertyDecl * FindPropertyDeclaration(const IdentifierInfo *PropertyId) const
void setSetterName(Selector Sel)
ObjCInterfaceDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this Objective-C class.
A list of Objective-C protocols, along with the source locations at which they were referenced...
const ObjCProtocolList & getReferencedProtocols() const
void setCategoryListRaw(ObjCCategoryDecl *category)
Set the raw pointer to the start of the category/extension list.
unsigned protocol_size() const
protocol_range protocols() const
ObjCImplementationDecl * getImplementation() const
void addDecl(Decl *D)
Add the declaration D into this context.
protocol_iterator protocol_end() const
ObjCCategoryDecl * value_type
const ObjCInterfaceDecl * getClassInterface() const
__PTRDIFF_TYPE__ ptrdiff_t
ObjCPropertyDecl * getPropertyDecl() const
AccessControl getAccessControl() const
classmeth_range class_methods() const
static bool classofKind(Kind K)
llvm::iterator_range< known_extensions_iterator > known_extensions_range
Represents a field declaration created by an @defs(...).
bool isImplicitInterfaceDecl() const
known_categories_iterator known_categories_end() const
Retrieve an iterator to the end of the known-categories list.
void setIvarInitializers(ASTContext &C, CXXCtorInitializer **initializers, unsigned numInitializers)
llvm::iterator_range< protocol_loc_iterator > protocol_loc_range
StringRef getName() const
bool isReadOnly() const
isReadOnly - Return true iff the property has a setter.
static ObjCImplementationDecl * CreateDeserialized(ASTContext &C, unsigned ID)
ObjCIvarDecl * lookupInstanceVariable(IdentifierInfo *IVarName)
ObjCMethodDecl * lookupPropertyAccessor(const Selector Sel, const ObjCCategoryDecl *Cat) const
Lookup a setter or getter in the class hierarchy, including in all categories except for category pas...
void setInstanceMethod(bool isInst)
void SetRelatedResultType(bool RRT=true)
Note whether this method has a related result type.
method_iterator meth_begin() const
all_protocol_iterator all_referenced_protocol_begin() const
void setClassInterface(ObjCInterfaceDecl *IFace)
llvm::mapped_iterator< param_const_iterator, deref_fun > param_type_iterator
void setReturnTypeSourceInfo(TypeSourceInfo *TInfo)
void setIvarLBraceLoc(SourceLocation Loc)
void setPropertyAttributes(PropertyAttributeKind PRVal)
static bool classofKind(Kind K)
ObjCInterfaceDecl * getSuperClass() const
Kind
Lists the kind of concrete classes of Decl.
PropertyAttributeKind getPropertyAttributesAsWritten() const
QualType getSendResultType() const
Determine the type of an expression that sends a message to this function. This replaces the type par...
SourceLocation getIvarRBraceLoc() const
ObjCInterfaceDecl * getMostRecentDecl()
Returns the most recent (re)declaration of this declaration.
static ObjCInterfaceDecl * CreateDeserialized(const ASTContext &C, unsigned ID)
For nullary selectors, immediately before the end: "[foo release]" / "-(void)release;" Or immediately...
bool isIvarNameSpecified() const
For @synthesize, returns true if an ivar name was explicitly specified.
static ObjCPropertyImplDecl * CreateDeserialized(ASTContext &C, unsigned ID)
void addPropertyImplementation(ObjCPropertyImplDecl *property)
void setAtLoc(SourceLocation Loc)
const ObjCInterfaceDecl * getCanonicalDecl() const
ObjCList< ObjCProtocolDecl >::iterator all_protocol_iterator
static bool classof(const Decl *D)
A trivial tuple used to represent a source range.
SourceLocation getLocation() const
void setLexicalDeclContext(DeclContext *DC)
propimpl_iterator propimpl_end() const
ObjCIvarDecl * all_declared_ivar_begin()
static bool classof(const Decl *D)
bool known_categories_empty() const
Determine whether the known-categories list is empty.
SourceRange getSourceRange() const
static ObjCCategoryImplDecl * Create(ASTContext &C, DeclContext *DC, IdentifierInfo *Id, ObjCInterfaceDecl *classInterface, SourceLocation nameLoc, SourceLocation atStartLoc, SourceLocation CategoryNameLoc)
void setVariance(ObjCTypeParamVariance variance)
Set the variance of this type parameter.
static bool classofKind(Kind K)
redeclarable_base::redecl_range redecl_range
static ObjCPropertyDecl * CreateDeserialized(ASTContext &C, unsigned ID)
llvm::iterator_range< visible_extensions_iterator > visible_extensions_range
void setHasDesignatedInitializers()
IdentifierInfo * getDefaultSynthIvarName(ASTContext &Ctx) const
Get the default name of the synthesized ivar.
void collectPropertiesToImplement(PropertyMap &PM, PropertyDeclOrder &PO) const override
void setCmdDecl(ImplicitParamDecl *CD)
The parameter is invariant: must match exactly.
const ObjCObjectType * getSuperClassType() const
Retrieve the superclass type.
visible_extensions_range visible_extensions() const
void setPropertyIvarDecl(ObjCIvarDecl *Ivar)
const_iterator end() const
DeclContext(Decl::Kind K)
unsigned getNumIvarInitializers() const
getNumArgs - Number of ivars which must be initialized.
const ObjCProtocolList & getReferencedProtocols() const
bool isHidden() const
Determine whether this declaration is hidden from name lookup.
param_type_iterator param_type_begin() const
const ObjCInterfaceDecl * getSuperClass() const