class ObjCMethodDecl
Declaration
class ObjCMethodDecl : public NamedDecl, public DeclContext { /* full declaration omitted */ };
Description
ObjCMethodDecl - Represents an instance or class method declaration. ObjC methods can be declared within 4 contexts: class interfaces, categories, protocols, and class implementations. While C++ member functions leverage C syntax, Objective-C method syntax is modeled after Smalltalk (using colons to specify argument types/expressions). Here are some brief examples: Setter/getter instance methods: - (void)setMenu:(NSMenu *)menu; - (NSMenu *)menu; Instance method that takes 2 NSView arguments: - (void)replaceSubview:(NSView *)oldView with:(NSView *)newView; Getter class method: + (NSMenu *)defaultMenu; A selector represents a unique name for a method. The selector names for the above methods are setMenu:, menu, replaceSubview:with:, and defaultMenu.
Declared at: clang/include/clang/AST/DeclObjC.h:139
Inherits from: NamedDecl, DeclContext
Member Variables
- private clang::QualType MethodDeclType
- Return type of this method.
- private clang::TypeSourceInfo* ReturnTInfo
- Type source information for the return type.
- private void* ParamsAndSelLocs = nullptr
- Array of ParmVarDecls for the formal parameters of this method and optionally followed by selector locations.
- private unsigned int NumParams = 0
- private clang::SourceLocation DeclEndLoc
- List of attributes for this method declaration.
- private clang::LazyDeclStmtPtr Body
- The following are only used for method definitions, null otherwise.
- private clang::ImplicitParamDecl* SelfDecl = nullptr
- SelfDecl - Decl for the implicit self parameter. This is lazily constructed by createImplicitParams.
- private clang::ImplicitParamDecl* CmdDecl = nullptr
- CmdDecl - Decl for the implicit _cmd parameter. This is lazily constructed by createImplicitParams.
Inherited from DeclContext:
- protected
- protected FirstDecl = nullptr
- protected LastDecl = nullptr
Inherited from Decl:
- protected NextInContextAndBits
- protected Access
- protected FromASTFile
- protected IdentifierNamespace
- protected CacheValidAndLinkage
Method Overview
- public static clang::ObjCMethodDecl * Create(clang::ASTContext & C, clang::SourceLocation beginLoc, clang::SourceLocation endLoc, clang::Selector SelInfo, clang::QualType T, clang::TypeSourceInfo * ReturnTInfo, clang::DeclContext * contextDecl, bool isInstance = true, bool isVariadic = false, bool isPropertyAccessor = false, bool isSynthesizedAccessorStub = false, bool isImplicitlyDeclared = false, bool isDefined = false, clang::ObjCMethodDecl::ImplementationControl impControl = None, bool HasRelatedResultType = false)
- public static clang::ObjCMethodDecl * CreateDeserialized(clang::ASTContext & C, unsigned int ID)
- private ObjCMethodDecl(clang::SourceLocation beginLoc, clang::SourceLocation endLoc, clang::Selector SelInfo, clang::QualType T, clang::TypeSourceInfo * ReturnTInfo, clang::DeclContext * contextDecl, bool isInstance = true, bool isVariadic = false, bool isPropertyAccessor = false, bool isSynthesizedAccessorStub = false, bool isImplicitlyDeclared = false, bool isDefined = false, clang::ObjCMethodDecl::ImplementationControl impControl = None, bool HasRelatedResultType = false)
- public static clang::ObjCMethodDecl * castFromDeclContext(const clang::DeclContext * DC)
- public static clang::DeclContext * castToDeclContext(const clang::ObjCMethodDecl * D)
- public static bool classof(const clang::Decl * D)
- public static bool classofKind(clang::Decl::Kind K)
- public void createImplicitParams(clang::ASTContext & Context, const clang::ObjCInterfaceDecl * ID)
- public bool definedInNSObject(const clang::ASTContext &) const
- public const clang::ObjCPropertyDecl * findPropertyDecl(bool CheckOverrides = true) const
- public clang::SourceLocation getBeginLoc() const
- public clang::Stmt * getBody() const
- public clang::ObjCMethodDecl * getCanonicalDecl()
- public const clang::ObjCMethodDecl * getCanonicalDecl() const
- public clang::ObjCCategoryDecl * getCategory()
- public const clang::ObjCCategoryDecl * getCategory() const
- public clang::ObjCInterfaceDecl * getClassInterface()
- public const clang::ObjCInterfaceDecl * getClassInterface() const
- public clang::ImplicitParamDecl * getCmdDecl() const
- public clang::CompoundStmt * getCompoundBody()
- public clang::SourceLocation getDeclaratorEndLoc() const
- public clang::SourceLocation getEndLoc() const
- public clang::ObjCMethodDecl::ImplementationControl getImplementationControl() const
- public clang::ObjCMethodFamily getMethodFamily() const
- private clang::ObjCMethodDecl * getNextRedeclarationImpl()
- public unsigned int getNumSelectorLocs() const
- private unsigned int getNumStoredSelLocs() const
- public clang::Decl::ObjCDeclQualifier getObjCDeclQualifier() const
- public void getOverriddenMethods(SmallVectorImpl<const clang::ObjCMethodDecl *> & Overridden) const
- public const clang::ParmVarDecl * getParamDecl(unsigned int Idx) const
- public clang::ParmVarDecl * getParamDecl(unsigned int Idx)
- private const clang::ParmVarDecl *const * getParams() const
- private clang::ParmVarDecl ** getParams()
- public clang::QualType getReturnType() const
- public clang::TypeSourceInfo * getReturnTypeSourceInfo() const
- public clang::SourceRange getReturnTypeSourceRange() const
- private clang::SelectorLocationsKind getSelLocsKind() const
- public clang::Selector getSelector() const
- public clang::SourceLocation getSelectorLoc(unsigned int Index) const
- public void getSelectorLocs(SmallVectorImpl<clang::SourceLocation> & SelLocs) const
- public clang::SourceLocation getSelectorStartLoc() const
- public clang::ImplicitParamDecl * getSelfDecl() const
- public clang::QualType getSelfType(clang::ASTContext & Context, const clang::ObjCInterfaceDecl * OID, bool & selfIsPseudoStrong, bool & selfIsConsumed) const
- public clang::QualType getSendResultType() const
- public clang::QualType getSendResultType(clang::QualType receiverType) const
- public clang::SourceRange getSourceRange() const
- private const clang::SourceLocation * getStoredSelLocs() const
- private clang::SourceLocation * getStoredSelLocs()
- public bool hasBody() const
- public bool hasParamDestroyedInCallee() const
- public bool hasRedeclaration() const
- public bool hasRelatedResultType() const
- public bool hasSkippedBody() const
- private bool hasStandardSelLocs() const
- public bool isClassMethod() const
- public bool isDefined() const
- public bool isDesignatedInitializerForTheInterface(const clang::ObjCMethodDecl ** InitMethod = nullptr) const
- public bool isDirectMethod() const
- public bool isInstanceMethod() const
- public bool isOptional() const
- public bool isOverriding() const
- public bool isPropertyAccessor() const
- public bool isRedeclaration() const
- public bool isSynthesizedAccessorStub() const
- public bool isThisDeclarationADefinition() const
- public bool isThisDeclarationADesignatedInitializer() const
- public bool isVariadic() const
- public clang::ObjCMethodDecl::param_iterator param_begin()
- public clang::ObjCMethodDecl::param_const_iterator param_begin() const
- public clang::ObjCMethodDecl::param_const_iterator param_end() const
- public clang::ObjCMethodDecl::param_iterator param_end()
- public unsigned int param_size() const
- public clang::ObjCMethodDecl::param_type_iterator param_type_begin() const
- public clang::ObjCMethodDecl::param_type_iterator param_type_end() const
- public ArrayRef<clang::ParmVarDecl *> parameters() const
- public clang::ObjCMethodDecl::param_const_iterator sel_param_end() const
- public void setAsRedeclaration(const clang::ObjCMethodDecl * PrevMethod)
- public void setBody(clang::Stmt * B)
- public void setCmdDecl(clang::ImplicitParamDecl * CD)
- public void setDeclImplementation(clang::ObjCMethodDecl::ImplementationControl ic)
- public void setDefined(bool isDefined)
- public void setHasRedeclaration(bool HRD) const
- public void setHasSkippedBody(bool Skipped = true)
- public void setInstanceMethod(bool isInst)
- public void setIsRedeclaration(bool RD)
- public void setLazyBody(uint64_t Offset)
- public void setMethodParams(clang::ASTContext & C, ArrayRef<clang::ParmVarDecl *> Params, ArrayRef<clang::SourceLocation> SelLocs = llvm::None)
- public void setObjCDeclQualifier(clang::Decl::ObjCDeclQualifier QV)
- public void setOverriding(bool IsOver)
- private void setParamsAndSelLocs(clang::ASTContext & C, ArrayRef<clang::ParmVarDecl *> Params, ArrayRef<clang::SourceLocation> SelLocs)
- public void setPropertyAccessor(bool isAccessor)
- public void setRelatedResultType(bool RRT = true)
- public void setReturnType(clang::QualType T)
- public void setReturnTypeSourceInfo(clang::TypeSourceInfo * TInfo)
- private void setSelLocsKind(clang::SelectorLocationsKind Kind)
- public void setSelfDecl(clang::ImplicitParamDecl * SD)
- public void setSynthesizedAccessorStub(bool isSynthesizedAccessorStub)
- public void setVariadic(bool isVar)
Inherited from DeclContext:
- protected BuildDeclChain
- public Encloses
- public Equals
- public InEnclosingNamespaceSetOf
- public addDecl
- public addDeclInternal
- public addHiddenDecl
- public buildLookup
- public classof
- public classof
- public collectAllContexts
- public containsDecl
- public containsDeclAndLoad
- public ddiags
- public decls
- public decls_begin
- public decls_empty
- public decls_end
- public dumpDeclContext
- public dumpLookups
- public dumpLookups
- public getDeclKind
- public getDeclKindName
- public getEnclosingNamespaceContext
- public getEnclosingNamespaceContext
- public getExternCContext
- public getInnermostBlockDecl
- public getLexicalParent
- public getLexicalParent
- public getLookupParent
- public getLookupParent
- public getLookupPtr
- public getNonClosureAncestor
- public getNonClosureAncestor
- public getNonTransparentContext
- public getNonTransparentContext
- public getOuterLexicalRecordContext
- public getOuterLexicalRecordContext
- public getParent
- public getParent
- public getParentASTContext
- public getPrimaryContext
- public getPrimaryContext
- public getRedeclContext
- public getRedeclContext
- public hasExternalLexicalStorage
- public hasExternalVisibleStorage
- public isClosure
- public isDeclInLexicalTraversal
- public isDependentContext
- public isExternCContext
- public isExternCXXContext
- public isFileContext
- public isFunctionOrMethod
- public isInlineNamespace
- public isLookupContext
- public isNamespace
- public isObjCContainer
- public isRecord
- public isStdNamespace
- public isTranslationUnit
- public isTransparentContext
- public localUncachedLookup
- public lookup
- public lookups
- public lookups_begin
- public lookups_end
- public makeDeclVisibleInContext
- public noload_decls
- public noload_decls_begin
- public noload_decls_end
- public noload_lookup
- public noload_lookups
- public noload_lookups_begin
- public noload_lookups_end
- public removeDecl
- public setHasExternalLexicalStorage
- public setHasExternalVisibleStorage
- public setMustBuildLookupTable
- public setUseQualifiedLookup
- public shouldUseQualifiedLookup
- public using_directives
Inherited from NamedDecl:
- public classof
- public classofKind
- public declarationReplaces
- public getDeclName
- public getExplicitVisibility
- public getFormalLinkage
- public getIdentifier
- public getLinkageAndVisibility
- public getLinkageInternal
- public getMostRecentDecl
- public getMostRecentDecl
- public getName
- public getNameAsString
- public getNameForDiagnostic
- public getObjCFStringFormattingFamily
- public getQualifiedNameAsString
- public getUnderlyingDecl
- public getUnderlyingDecl
- public getVisibility
- public hasExternalFormalLinkage
- public hasLinkage
- public hasLinkageBeenComputed
- public isCXXClassMember
- public isCXXInstanceMember
- public isExternallyDeclarable
- public isExternallyVisible
- public isLinkageValid
- public isReserved
- public printName
- public printNestedNameSpecifier
- public printNestedNameSpecifier
- public printQualifiedName
- public printQualifiedName
- public setDeclName
Inherited from Decl:
- public EnableStatistics
- public PrintStats
- public add
- public addAttr
- public attr_begin
- public attr_end
- public attrs
- public canBeWeakImported
- public castFromDeclContext
- public castToDeclContext
- public classofKind
- public dropAttr
- public dropAttrs
- public dump
- public dump
- public dumpColor
- public getASTContext
- protected getASTMutationListener
- public getAccess
- public getAccessUnsafe
- public getAsFunction
- public getAsFunction
- public getAttr
- public getAttrs
- public getAttrs
- public getAvailability
- public getBeginLoc
- public getBody
- public getBodyRBrace
- protected getCachedLinkage
- public getCanonicalDecl
- public getCanonicalDecl
- public getDeclContext
- public getDeclContext
- public getDeclKindName
- public getDefiningAttr
- public getDescribedTemplate
- public getDescribedTemplateParams
- public getEndLoc
- public getExternalSourceSymbolAttr
- public getFriendObjectKind
- public getFunctionType
- public getGlobalID
- public getID
- public getIdentifierNamespace
- public getIdentifierNamespaceForKind
- public getImportedOwningModule
- public getKind
- public getLangOpts
- public getLexicalDeclContext
- public getLexicalDeclContext
- public getLocalOwningModule
- public getLocation
- public getMaxAlignment
- public getModuleOwnershipKind
- public getMostRecentDecl
- public getMostRecentDecl
- protected getMostRecentDeclImpl
- public getNextDeclInContext
- public getNextDeclInContext
- protected getNextRedeclarationImpl
- public getNonClosureContext
- public getNonClosureContext
- public getOwningModule
- public getOwningModuleForLinkage
- public getOwningModuleID
- public getParentFunctionOrMethod
- public getParentFunctionOrMethod
- public getPreviousDecl
- public getPreviousDecl
- protected getPreviousDeclImpl
- public getSourceRange
- public getTemplateDepth
- public getTranslationUnitDecl
- public getTranslationUnitDecl
- public getVersionIntroduced
- public hasAttr
- public hasAttrs
- public hasBody
- protected hasCachedLinkage
- public hasDefiningAttr
- protected hasLocalOwningModuleStorage
- public hasOwningModule
- public hasTagIdentifierNamespace
- public isCanonicalDecl
- public isDefinedOutsideFunctionOrMethod
- public isDeprecated
- public isDiscardedInGlobalModuleFragment
- public isFirstDecl
- public isFromASTFile
- public isFunctionOrFunctionTemplate
- public isImplicit
- public isInAnonymousNamespace
- public isInExportDeclContext
- public isInIdentifierNamespace
- public isInLocalScopeForInstantiation
- public isInStdNamespace
- public isInvalidDecl
- public isInvisibleOutsideTheOwningModule
- public isLocalExternDecl
- public isModulePrivate
- public isOutOfLine
- public isParameterPack
- public isReachable
- public isReferenced
- public isTagIdentifierNamespace
- public isTemplateDecl
- public isTemplateParameter
- public isTemplateParameterPack
- public isTemplated
- public isThisDeclarationReferenced
- public isTopLevelDeclInObjCContainer
- public isUnavailable
- public isUnconditionallyVisible
- public isUsed
- public isWeakImported
- public markUsed
- public print
- public print
- public printGroup
- public redecls
- public redecls_begin
- public redecls_end
- public setAccess
- public setAttrs
- protected setCachedLinkage
- public setDeclContext
- public setFromASTFile
- public setImplicit
- public setInvalidDecl
- public setIsUsed
- public setLexicalDeclContext
- public setLocalExternDecl
- public setLocalOwningModule
- public setLocation
- public setModuleOwnershipKind
- protected setModulePrivate
- public setNonMemberOperator
- public setObjectOfFriendDecl
- public setOwningModuleID
- public setReferenced
- public setTopLevelDeclInObjCContainer
- public setVisibleDespiteOwningModule
- public specific_attr_begin
- public specific_attr_end
- public specific_attrs
- protected updateOutOfDate
Methods
¶static clang::ObjCMethodDecl* Create(
clang::ASTContext& C,
clang::SourceLocation beginLoc,
clang::SourceLocation endLoc,
clang::Selector SelInfo,
clang::QualType T,
clang::TypeSourceInfo* ReturnTInfo,
clang::DeclContext* contextDecl,
bool isInstance = true,
bool isVariadic = false,
bool isPropertyAccessor = false,
bool isSynthesizedAccessorStub = false,
bool isImplicitlyDeclared = false,
bool isDefined = false,
clang::ObjCMethodDecl::ImplementationControl
impControl = None,
bool HasRelatedResultType = false)
static clang::ObjCMethodDecl* Create(
clang::ASTContext& C,
clang::SourceLocation beginLoc,
clang::SourceLocation endLoc,
clang::Selector SelInfo,
clang::QualType T,
clang::TypeSourceInfo* ReturnTInfo,
clang::DeclContext* contextDecl,
bool isInstance = true,
bool isVariadic = false,
bool isPropertyAccessor = false,
bool isSynthesizedAccessorStub = false,
bool isImplicitlyDeclared = false,
bool isDefined = false,
clang::ObjCMethodDecl::ImplementationControl
impControl = None,
bool HasRelatedResultType = false)
Declared at: clang/include/clang/AST/DeclObjC.h:233
Parameters
- clang::ASTContext& C
- clang::SourceLocation beginLoc
- clang::SourceLocation endLoc
- clang::Selector SelInfo
- clang::QualType T
- clang::TypeSourceInfo* ReturnTInfo
- clang::DeclContext* contextDecl
- bool isInstance = true
- bool isVariadic = false
- bool isPropertyAccessor = false
- bool isSynthesizedAccessorStub = false
- bool isImplicitlyDeclared = false
- bool isDefined = false
- clang::ObjCMethodDecl::ImplementationControl impControl = None
- bool HasRelatedResultType = false
¶static clang::ObjCMethodDecl* CreateDeserialized(
clang::ASTContext& C,
unsigned int ID)
static clang::ObjCMethodDecl* CreateDeserialized(
clang::ASTContext& C,
unsigned int ID)
Declared at: clang/include/clang/AST/DeclObjC.h:242
Parameters
- clang::ASTContext& C
- unsigned int ID
¶ObjCMethodDecl(
clang::SourceLocation beginLoc,
clang::SourceLocation endLoc,
clang::Selector SelInfo,
clang::QualType T,
clang::TypeSourceInfo* ReturnTInfo,
clang::DeclContext* contextDecl,
bool isInstance = true,
bool isVariadic = false,
bool isPropertyAccessor = false,
bool isSynthesizedAccessorStub = false,
bool isImplicitlyDeclared = false,
bool isDefined = false,
clang::ObjCMethodDecl::ImplementationControl
impControl = None,
bool HasRelatedResultType = false)
ObjCMethodDecl(
clang::SourceLocation beginLoc,
clang::SourceLocation endLoc,
clang::Selector SelInfo,
clang::QualType T,
clang::TypeSourceInfo* ReturnTInfo,
clang::DeclContext* contextDecl,
bool isInstance = true,
bool isVariadic = false,
bool isPropertyAccessor = false,
bool isSynthesizedAccessorStub = false,
bool isImplicitlyDeclared = false,
bool isDefined = false,
clang::ObjCMethodDecl::ImplementationControl
impControl = None,
bool HasRelatedResultType = false)
Declared at: clang/include/clang/AST/DeclObjC.h:172
Parameters
- clang::SourceLocation beginLoc
- clang::SourceLocation endLoc
- clang::Selector SelInfo
- clang::QualType T
- clang::TypeSourceInfo* ReturnTInfo
- clang::DeclContext* contextDecl
- bool isInstance = true
- bool isVariadic = false
- bool isPropertyAccessor = false
- bool isSynthesizedAccessorStub = false
- bool isImplicitlyDeclared = false
- bool isDefined = false
- clang::ObjCMethodDecl::ImplementationControl impControl = None
- bool HasRelatedResultType = false
¶static clang::ObjCMethodDecl* castFromDeclContext(
const clang::DeclContext* DC)
static clang::ObjCMethodDecl* castFromDeclContext(
const clang::DeclContext* DC)
Declared at: clang/include/clang/AST/DeclObjC.h:551
Parameters
- const clang::DeclContext* DC
¶static clang::DeclContext* castToDeclContext(
const clang::ObjCMethodDecl* D)
static clang::DeclContext* castToDeclContext(
const clang::ObjCMethodDecl* D)
Declared at: clang/include/clang/AST/DeclObjC.h:547
Parameters
- const clang::ObjCMethodDecl* D
¶static bool classof(const clang::Decl* D)
static bool classof(const clang::Decl* D)
Declared at: clang/include/clang/AST/DeclObjC.h:544
Parameters
- const clang::Decl* D
¶static bool classofKind(clang::Decl::Kind K)
static bool classofKind(clang::Decl::Kind K)
Declared at: clang/include/clang/AST/DeclObjC.h:545
Parameters
- clang::Decl::Kind K
¶void createImplicitParams(
clang::ASTContext& Context,
const clang::ObjCInterfaceDecl* ID)
void createImplicitParams(
clang::ASTContext& Context,
const clang::ObjCInterfaceDecl* ID)
Description
createImplicitParams - Used to lazily create the self and cmd implicit parameters. This must be called prior to using getSelfDecl() or getCmdDecl(). The call is ignored if the implicit parameters have already been created.
Declared at: clang/include/clang/AST/DeclObjC.h:416
Parameters
- clang::ASTContext& Context
- const clang::ObjCInterfaceDecl* ID
¶bool definedInNSObject(
const clang::ASTContext&) const
bool definedInNSObject(
const clang::ASTContext&) const
Description
Is this method defined in the NSObject base class?
Declared at: clang/include/clang/AST/DeclObjC.h:541
Parameters
- const clang::ASTContext&
¶const clang::ObjCPropertyDecl* findPropertyDecl(
bool CheckOverrides = true) const
const clang::ObjCPropertyDecl* findPropertyDecl(
bool CheckOverrides = true) const
Description
Returns the property associated with this method's selector. Note that even if this particular method is not marked as a property accessor, it is still possible for it to match a property declared in a superclass. Pass \c false if you only want to check the current class.
Declared at: clang/include/clang/AST/DeclObjC.h:498
Parameters
- bool CheckOverrides = true
¶clang::SourceLocation getBeginLoc() const
clang::SourceLocation getBeginLoc() const
Declared at: clang/include/clang/AST/DeclObjC.h:285
¶clang::Stmt* getBody() const
clang::Stmt* getBody() const
Description
Retrieve the body of this method, if it has one.
Declared at: clang/include/clang/AST/DeclObjC.h:530
¶clang::ObjCMethodDecl* getCanonicalDecl()
clang::ObjCMethodDecl* getCanonicalDecl()
Description
Retrieves the "canonical" declaration of the given declaration.
Declared at: clang/include/clang/AST/DeclObjC.h:244
¶const clang::ObjCMethodDecl* getCanonicalDecl()
const
const clang::ObjCMethodDecl* getCanonicalDecl()
const
Declared at: clang/include/clang/AST/DeclObjC.h:245
¶clang::ObjCCategoryDecl* getCategory()
clang::ObjCCategoryDecl* getCategory()
Description
If this method is declared or implemented in a category, return that category.
Declared at: clang/include/clang/AST/DeclObjC.h:325
¶const clang::ObjCCategoryDecl* getCategory() const
const clang::ObjCCategoryDecl* getCategory() const
Declared at: clang/include/clang/AST/DeclObjC.h:326
¶clang::ObjCInterfaceDecl* getClassInterface()
clang::ObjCInterfaceDecl* getClassInterface()
Declared at: clang/include/clang/AST/DeclObjC.h:318
¶const clang::ObjCInterfaceDecl*
getClassInterface() const
const clang::ObjCInterfaceDecl*
getClassInterface() const
Declared at: clang/include/clang/AST/DeclObjC.h:319
¶clang::ImplicitParamDecl* getCmdDecl() const
clang::ImplicitParamDecl* getCmdDecl() const
Declared at: clang/include/clang/AST/DeclObjC.h:425
¶clang::CompoundStmt* getCompoundBody()
clang::CompoundStmt* getCompoundBody()
Declared at: clang/include/clang/AST/DeclObjC.h:534
¶clang::SourceLocation getDeclaratorEndLoc() const
clang::SourceLocation getDeclaratorEndLoc() const
Description
Returns the location where the declarator ends. It will be the location of ';' for a method declaration and the location of '{' for a method definition.
Declared at: clang/include/clang/AST/DeclObjC.h:282
¶clang::SourceLocation getEndLoc() const
clang::SourceLocation getEndLoc() const
Declared at: clang/include/clang/AST/DeclObjC.h:286
¶clang::ObjCMethodDecl::ImplementationControl
getImplementationControl() const
clang::ObjCMethodDecl::ImplementationControl
getImplementationControl() const
Declared at: clang/include/clang/AST/DeclObjC.h:505
¶clang::ObjCMethodFamily getMethodFamily() const
clang::ObjCMethodFamily getMethodFamily() const
Description
Determines the family of this method.
Declared at: clang/include/clang/AST/DeclObjC.h:429
¶clang::ObjCMethodDecl* getNextRedeclarationImpl()
clang::ObjCMethodDecl* getNextRedeclarationImpl()
Description
A definition will return its interface declaration. An interface declaration will return its definition. Otherwise it will return itself.
Declared at: clang/include/clang/AST/DeclObjC.h:226
¶unsigned int getNumSelectorLocs() const
unsigned int getNumSelectorLocs() const
Declared at: clang/include/clang/AST/DeclObjC.h:309
¶unsigned int getNumStoredSelLocs() const
unsigned int getNumStoredSelLocs() const
Description
Get the number of stored selector identifiers locations. No locations will be stored if HasStandardSelLocs is true.
Declared at: clang/include/clang/AST/DeclObjC.h:213
¶clang::Decl::ObjCDeclQualifier
getObjCDeclQualifier() const
clang::Decl::ObjCDeclQualifier
getObjCDeclQualifier() const
Declared at: clang/include/clang/AST/DeclObjC.h:249
¶void getOverriddenMethods(
SmallVectorImpl<const clang::ObjCMethodDecl*>&
Overridden) const
void getOverriddenMethods(
SmallVectorImpl<const clang::ObjCMethodDecl*>&
Overridden) const
Description
Return overridden methods for the given \p Method. An ObjC method is considered to override any method in the class's base classes (and base's categories), its protocols, or its categories' protocols, that has the same selector and is of the same kind (class or instance). A method in an implementation is not considered as overriding the same method in the interface or its categories.
Declared at: clang/include/clang/AST/DeclObjC.h:478
Parameters
- SmallVectorImpl<const clang::ObjCMethodDecl*>& Overridden
¶const clang::ParmVarDecl* getParamDecl(
unsigned int Idx) const
const clang::ParmVarDecl* getParamDecl(
unsigned int Idx) const
Declared at: clang/include/clang/AST/DeclObjC.h:385
Parameters
- unsigned int Idx
¶clang::ParmVarDecl* getParamDecl(unsigned int Idx)
clang::ParmVarDecl* getParamDecl(unsigned int Idx)
Declared at: clang/include/clang/AST/DeclObjC.h:381
Parameters
- unsigned int Idx
¶const clang::ParmVarDecl* const* getParams() const
const clang::ParmVarDecl* const* getParams() const
Declared at: clang/include/clang/AST/DeclObjC.h:207
¶clang::ParmVarDecl** getParams()
clang::ParmVarDecl** getParams()
Description
Get a pointer to the stored selector identifiers locations array. No locations will be stored if HasStandardSelLocs is true.
Declared at: clang/include/clang/AST/DeclObjC.h:204
¶clang::QualType getReturnType() const
clang::QualType getReturnType() const
Declared at: clang/include/clang/AST/DeclObjC.h:332
¶clang::TypeSourceInfo* getReturnTypeSourceInfo()
const
clang::TypeSourceInfo* getReturnTypeSourceInfo()
const
Declared at: clang/include/clang/AST/DeclObjC.h:346
¶clang::SourceRange getReturnTypeSourceRange()
const
clang::SourceRange getReturnTypeSourceRange()
const
Declared at: clang/include/clang/AST/DeclObjC.h:334
¶clang::SelectorLocationsKind getSelLocsKind()
const
clang::SelectorLocationsKind getSelLocsKind()
const
Declared at: clang/include/clang/AST/DeclObjC.h:181
¶clang::Selector getSelector() const
clang::Selector getSelector() const
Declared at: clang/include/clang/AST/DeclObjC.h:330
¶clang::SourceLocation getSelectorLoc(
unsigned int Index) const
clang::SourceLocation getSelectorLoc(
unsigned int Index) const
Declared at: clang/include/clang/AST/DeclObjC.h:297
Parameters
- unsigned int Index
¶void getSelectorLocs(
SmallVectorImpl<clang::SourceLocation>&
SelLocs) const
void getSelectorLocs(
SmallVectorImpl<clang::SourceLocation>&
SelLocs) const
Declared at: clang/include/clang/AST/DeclObjC.h:307
Parameters
- SmallVectorImpl<clang::SourceLocation>& SelLocs
¶clang::SourceLocation getSelectorStartLoc() const
clang::SourceLocation getSelectorStartLoc() const
Declared at: clang/include/clang/AST/DeclObjC.h:291
¶clang::ImplicitParamDecl* getSelfDecl() const
clang::ImplicitParamDecl* getSelfDecl() const
Declared at: clang/include/clang/AST/DeclObjC.h:423
¶clang::QualType getSelfType(
clang::ASTContext& Context,
const clang::ObjCInterfaceDecl* OID,
bool& selfIsPseudoStrong,
bool& selfIsConsumed) const
clang::QualType getSelfType(
clang::ASTContext& Context,
const clang::ObjCInterfaceDecl* OID,
bool& selfIsPseudoStrong,
bool& selfIsConsumed) const
Declared at: clang/include/clang/AST/DeclObjC.h:420
Parameters
- clang::ASTContext& Context
- const clang::ObjCInterfaceDecl* OID
- bool& selfIsPseudoStrong
- bool& selfIsConsumed
Returns
the type for \c self and set
¶clang::QualType getSendResultType() const
clang::QualType getSendResultType() const
Description
Determine the type of an expression that sends a message to this function. This replaces the type parameters with the types they would get if the receiver was parameterless (e.g. it may replace the type parameter with 'id').
Declared at: clang/include/clang/AST/DeclObjC.h:340
¶clang::QualType getSendResultType(
clang::QualType receiverType) const
clang::QualType getSendResultType(
clang::QualType receiverType) const
Description
Determine the type of an expression that sends a message to this function with the given receiver type.
Declared at: clang/include/clang/AST/DeclObjC.h:344
Parameters
- clang::QualType receiverType
¶clang::SourceRange getSourceRange() const
clang::SourceRange getSourceRange() const
Description
Source range that this declaration covers.
Declared at: clang/include/clang/AST/DeclObjC.h:287
¶const clang::SourceLocation* getStoredSelLocs()
const
const clang::SourceLocation* getStoredSelLocs()
const
Declared at: clang/include/clang/AST/DeclObjC.h:198
¶clang::SourceLocation* getStoredSelLocs()
clang::SourceLocation* getStoredSelLocs()
Description
Get a pointer to the stored selector identifiers locations array. No locations will be stored if HasStandardSelLocs is true.
Declared at: clang/include/clang/AST/DeclObjC.h:195
¶bool hasBody() const
bool hasBody() const
Description
Determine whether this method has a body.
Declared at: clang/include/clang/AST/DeclObjC.h:527
¶bool hasParamDestroyedInCallee() const
bool hasParamDestroyedInCallee() const
Description
True if the method has a parameter that's destroyed in the callee.
Declared at: clang/include/clang/AST/DeclObjC.h:491
¶bool hasRedeclaration() const
bool hasRedeclaration() const
Description
True if redeclared in the same interface.
Declared at: clang/include/clang/AST/DeclObjC.h:274
¶bool hasRelatedResultType() const
bool hasRelatedResultType() const
Description
Determine whether this method has a result type that is related to the message receiver's type.
Declared at: clang/include/clang/AST/DeclObjC.h:259
¶bool hasSkippedBody() const
bool hasSkippedBody() const
Description
True if the method was a definition but its body was skipped.
Declared at: clang/include/clang/AST/DeclObjC.h:482
¶bool hasStandardSelLocs() const
bool hasStandardSelLocs() const
Declared at: clang/include/clang/AST/DeclObjC.h:189
¶bool isClassMethod() const
bool isClassMethod() const
Declared at: clang/include/clang/AST/DeclObjC.h:439
¶bool isDefined() const
bool isDefined() const
Declared at: clang/include/clang/AST/DeclObjC.h:457
¶bool isDesignatedInitializerForTheInterface(
const clang::ObjCMethodDecl** InitMethod =
nullptr) const
bool isDesignatedInitializerForTheInterface(
const clang::ObjCMethodDecl** InitMethod =
nullptr) const
Description
Returns true if the method selector resolves to a designated initializer in the class's interface.
Declared at: clang/include/clang/AST/DeclObjC.h:523
Parameters
- const clang::ObjCMethodDecl** InitMethod = nullptr
- if non-null and the function returns true, it receives the method declaration that was marked with the designated initializer attribute.
¶bool isDirectMethod() const
bool isDirectMethod() const
Description
True if the method is tagged as objc_direct
Declared at: clang/include/clang/AST/DeclObjC.h:488
¶bool isInstanceMethod() const
bool isInstanceMethod() const
Declared at: clang/include/clang/AST/DeclObjC.h:431
¶bool isOptional() const
bool isOptional() const
Declared at: clang/include/clang/AST/DeclObjC.h:509
¶bool isOverriding() const
bool isOverriding() const
Description
Whether this method overrides any other in the class hierarchy. A method is said to override any method in the class's base classes, its protocols, or its categories' protocols, that has the same selector and is of the same kind (class or instance). A method in an implementation is not considered as overriding the same method in the interface or its categories.
Declared at: clang/include/clang/AST/DeclObjC.h:467
¶bool isPropertyAccessor() const
bool isPropertyAccessor() const
Declared at: clang/include/clang/AST/DeclObjC.h:441
¶bool isRedeclaration() const
bool isRedeclaration() const
Description
True if this is a method redeclaration in the same interface.
Declared at: clang/include/clang/AST/DeclObjC.h:269
¶bool isSynthesizedAccessorStub() const
bool isSynthesizedAccessorStub() const
Declared at: clang/include/clang/AST/DeclObjC.h:449
¶bool isThisDeclarationADefinition() const
bool isThisDeclarationADefinition() const
Description
Returns whether this specific method is a definition.
Declared at: clang/include/clang/AST/DeclObjC.h:538
¶bool isThisDeclarationADesignatedInitializer()
const
bool isThisDeclarationADesignatedInitializer()
const
Description
Returns true if this specific method declaration is marked with the designated initializer attribute.
Declared at: clang/include/clang/AST/DeclObjC.h:515
¶bool isVariadic() const
bool isVariadic() const
Declared at: clang/include/clang/AST/DeclObjC.h:436
¶clang::ObjCMethodDecl::param_iterator
param_begin()
clang::ObjCMethodDecl::param_iterator
param_begin()
Declared at: clang/include/clang/AST/DeclObjC.h:365
¶clang::ObjCMethodDecl::param_const_iterator
param_begin() const
clang::ObjCMethodDecl::param_const_iterator
param_begin() const
Declared at: clang/include/clang/AST/DeclObjC.h:357
¶clang::ObjCMethodDecl::param_const_iterator
param_end() const
clang::ObjCMethodDecl::param_const_iterator
param_end() const
Declared at: clang/include/clang/AST/DeclObjC.h:361
¶clang::ObjCMethodDecl::param_iterator param_end()
clang::ObjCMethodDecl::param_iterator param_end()
Declared at: clang/include/clang/AST/DeclObjC.h:366
¶unsigned int param_size() const
unsigned int param_size() const
Declared at: clang/include/clang/AST/DeclObjC.h:350
¶clang::ObjCMethodDecl::param_type_iterator
param_type_begin() const
clang::ObjCMethodDecl::param_type_iterator
param_type_begin() const
Declared at: clang/include/clang/AST/DeclObjC.h:404
¶clang::ObjCMethodDecl::param_type_iterator
param_type_end() const
clang::ObjCMethodDecl::param_type_iterator
param_type_end() const
Declared at: clang/include/clang/AST/DeclObjC.h:408
¶ArrayRef<clang::ParmVarDecl*> parameters() const
ArrayRef<clang::ParmVarDecl*> parameters() const
Declared at: clang/include/clang/AST/DeclObjC.h:376
¶clang::ObjCMethodDecl::param_const_iterator
sel_param_end() const
clang::ObjCMethodDecl::param_const_iterator
sel_param_end() const
Declared at: clang/include/clang/AST/DeclObjC.h:370
¶void setAsRedeclaration(
const clang::ObjCMethodDecl* PrevMethod)
void setAsRedeclaration(
const clang::ObjCMethodDecl* PrevMethod)
Declared at: clang/include/clang/AST/DeclObjC.h:271
Parameters
- const clang::ObjCMethodDecl* PrevMethod
¶void setBody(clang::Stmt* B)
void setBody(clang::Stmt* B)
Declared at: clang/include/clang/AST/DeclObjC.h:535
Parameters
- clang::Stmt* B
¶void setCmdDecl(clang::ImplicitParamDecl* CD)
void setCmdDecl(clang::ImplicitParamDecl* CD)
Declared at: clang/include/clang/AST/DeclObjC.h:426
Parameters
¶void setDeclImplementation(
clang::ObjCMethodDecl::ImplementationControl
ic)
void setDeclImplementation(
clang::ObjCMethodDecl::ImplementationControl
ic)
Declared at: clang/include/clang/AST/DeclObjC.h:501
Parameters
- clang::ObjCMethodDecl::ImplementationControl ic
¶void setDefined(bool isDefined)
void setDefined(bool isDefined)
Declared at: clang/include/clang/AST/DeclObjC.h:458
Parameters
- bool isDefined
¶void setHasRedeclaration(bool HRD) const
void setHasRedeclaration(bool HRD) const
Declared at: clang/include/clang/AST/DeclObjC.h:275
Parameters
- bool HRD
¶void setHasSkippedBody(bool Skipped = true)
void setHasSkippedBody(bool Skipped = true)
Declared at: clang/include/clang/AST/DeclObjC.h:483
Parameters
- bool Skipped = true
¶void setInstanceMethod(bool isInst)
void setInstanceMethod(bool isInst)
Declared at: clang/include/clang/AST/DeclObjC.h:432
Parameters
- bool isInst
¶void setIsRedeclaration(bool RD)
void setIsRedeclaration(bool RD)
Declared at: clang/include/clang/AST/DeclObjC.h:270
Parameters
- bool RD
¶void setLazyBody(uint64_t Offset)
void setLazyBody(uint64_t Offset)
Declared at: clang/include/clang/AST/DeclObjC.h:532
Parameters
- uint64_t Offset
¶void setMethodParams(
clang::ASTContext& C,
ArrayRef<clang::ParmVarDecl*> Params,
ArrayRef<clang::SourceLocation> SelLocs =
llvm::None)
void setMethodParams(
clang::ASTContext& C,
ArrayRef<clang::ParmVarDecl*> Params,
ArrayRef<clang::SourceLocation> SelLocs =
llvm::None)
Description
Sets the method's parameters and selector source locations. If the method is implicit (not coming from source) \p SelLocs is ignored.
Declared at: clang/include/clang/AST/DeclObjC.h:392
Parameters
- clang::ASTContext& C
- ArrayRef<clang::ParmVarDecl*> Params
- ArrayRef<clang::SourceLocation> SelLocs = llvm::None
¶void setObjCDeclQualifier(
clang::Decl::ObjCDeclQualifier QV)
void setObjCDeclQualifier(
clang::Decl::ObjCDeclQualifier QV)
Declared at: clang/include/clang/AST/DeclObjC.h:253
Parameters
- clang::Decl::ObjCDeclQualifier QV
¶void setOverriding(bool IsOver)
void setOverriding(bool IsOver)
Declared at: clang/include/clang/AST/DeclObjC.h:468
Parameters
- bool IsOver
¶void setParamsAndSelLocs(
clang::ASTContext& C,
ArrayRef<clang::ParmVarDecl*> Params,
ArrayRef<clang::SourceLocation> SelLocs)
void setParamsAndSelLocs(
clang::ASTContext& C,
ArrayRef<clang::ParmVarDecl*> Params,
ArrayRef<clang::SourceLocation> SelLocs)
Declared at: clang/include/clang/AST/DeclObjC.h:219
Parameters
- clang::ASTContext& C
- ArrayRef<clang::ParmVarDecl*> Params
- ArrayRef<clang::SourceLocation> SelLocs
¶void setPropertyAccessor(bool isAccessor)
void setPropertyAccessor(bool isAccessor)
Declared at: clang/include/clang/AST/DeclObjC.h:445
Parameters
- bool isAccessor
¶void setRelatedResultType(bool RRT = true)
void setRelatedResultType(bool RRT = true)
Description
Note whether this method has a related result type.
Declared at: clang/include/clang/AST/DeclObjC.h:264
Parameters
- bool RRT = true
¶void setReturnType(clang::QualType T)
void setReturnType(clang::QualType T)
Declared at: clang/include/clang/AST/DeclObjC.h:333
Parameters
¶void setReturnTypeSourceInfo(
clang::TypeSourceInfo* TInfo)
void setReturnTypeSourceInfo(
clang::TypeSourceInfo* TInfo)
Declared at: clang/include/clang/AST/DeclObjC.h:347
Parameters
- clang::TypeSourceInfo* TInfo
¶void setSelLocsKind(
clang::SelectorLocationsKind Kind)
void setSelLocsKind(
clang::SelectorLocationsKind Kind)
Declared at: clang/include/clang/AST/DeclObjC.h:185
Parameters
- clang::SelectorLocationsKind Kind
¶void setSelfDecl(clang::ImplicitParamDecl* SD)
void setSelfDecl(clang::ImplicitParamDecl* SD)
Declared at: clang/include/clang/AST/DeclObjC.h:424
Parameters
¶void setSynthesizedAccessorStub(
bool isSynthesizedAccessorStub)
void setSynthesizedAccessorStub(
bool isSynthesizedAccessorStub)
Declared at: clang/include/clang/AST/DeclObjC.h:453
Parameters
- bool isSynthesizedAccessorStub
¶void setVariadic(bool isVar)
void setVariadic(bool isVar)
Declared at: clang/include/clang/AST/DeclObjC.h:437
Parameters
- bool isVar