class ObjCMessageExpr
Declaration
class ObjCMessageExpr : public Expr, private TrailingObjects { /* full declaration omitted */ };
Description
An expression that sends a message to the given Objective-C object or class. The following contains two message send expressions: The innermost message send invokes the "alloc" class method on the NSString class, while the outermost message send invokes the "initWithString" instance method on the object returned from NSString's "alloc". In all, an Objective-C message send can take on four different (although related) forms: 1. Send to an object instance. 2. Send to a class. 3. Send to the superclass instance of the current class. 4. Send to the superclass of the current class. All four kinds of message sends are modeled by the ObjCMessageExpr class, and can be distinguished via \c getReceiverKind(). Example: The "void *" trailing objects are actually ONE void * (the receiver pointer), and NumArgs Expr *. But due to the implementation of children(), these must be together contiguously.
Declared at: clang/include/clang/AST/ExprObjC.h:940
Inherits from: Expr, TrailingObjects
Member Variables
- private uintptr_t SelectorOrMethod = 0
- Stores either the selector that this message is sending to (when \c HasMethod is zero) or an \c ObjCMethodDecl pointer referring to the method that we type-checked against.
- private unsigned int NumArgs
- The number of arguments in the message send, not including the receiver.
- private unsigned int Kind
- We pad this out to a byte to avoid excessive masking and shifting.
- private unsigned int HasMethod
- When non-zero, we have a method declaration; otherwise, we just have a selector.
- private unsigned int IsDelegateInitCall
- Whether this message send is a "delegate init call", i.e. a call of an init method on self from within an init method.
- private unsigned int IsImplicit
- Whether this message send was implicitly generated by the implementation rather than explicitly written by the user.
- private unsigned int SelLocsKind
- Whether the locations of the selector identifiers are in a "standard" position, a enum SelectorLocationsKind.
- private clang::SourceLocation SuperLoc
- When the message expression is a send to 'super', this is the location of the 'super' keyword.
- private clang::SourceLocation LBracLoc
- The source locations of the open and close square brackets ('[' and ']', respectively).
- private clang::SourceLocation RBracLoc
- The source locations of the open and close square brackets ('[' and ']', respectively).
Inherited from Stmt:
Method Overview
- public static clang::ObjCMessageExpr * Create(const clang::ASTContext & Context, clang::QualType T, clang::ExprValueKind VK, clang::SourceLocation LBracLoc, clang::Expr * Receiver, clang::Selector Sel, ArrayRef<clang::SourceLocation> SeLocs, clang::ObjCMethodDecl * Method, ArrayRef<clang::Expr *> Args, clang::SourceLocation RBracLoc, bool isImplicit)
- public static clang::ObjCMessageExpr * Create(const clang::ASTContext & Context, clang::QualType T, clang::ExprValueKind VK, clang::SourceLocation LBracLoc, clang::TypeSourceInfo * Receiver, clang::Selector Sel, ArrayRef<clang::SourceLocation> SelLocs, clang::ObjCMethodDecl * Method, ArrayRef<clang::Expr *> Args, clang::SourceLocation RBracLoc, bool isImplicit)
- public static clang::ObjCMessageExpr * Create(const clang::ASTContext & Context, clang::QualType T, clang::ExprValueKind VK, clang::SourceLocation LBracLoc, clang::SourceLocation SuperLoc, bool IsInstanceSuper, clang::QualType SuperType, clang::Selector Sel, ArrayRef<clang::SourceLocation> SelLocs, clang::ObjCMethodDecl * Method, ArrayRef<clang::Expr *> Args, clang::SourceLocation RBracLoc, bool isImplicit)
- public static clang::ObjCMessageExpr * CreateEmpty(const clang::ASTContext & Context, unsigned int NumArgs, unsigned int NumStoredSelLocs)
- private ObjCMessageExpr(clang::QualType T, clang::ExprValueKind VK, clang::SourceLocation LBracLoc, clang::SourceLocation SuperLoc, bool IsInstanceSuper, clang::QualType SuperType, clang::Selector Sel, ArrayRef<clang::SourceLocation> SelLocs, clang::SelectorLocationsKind SelLocsK, clang::ObjCMethodDecl * Method, ArrayRef<clang::Expr *> Args, clang::SourceLocation RBracLoc, bool isImplicit)
- private ObjCMessageExpr(clang::Stmt::EmptyShell Empty, unsigned int NumArgs)
- private ObjCMessageExpr(clang::QualType T, clang::ExprValueKind VK, clang::SourceLocation LBracLoc, clang::Expr * Receiver, clang::Selector Sel, ArrayRef<clang::SourceLocation> SelLocs, clang::SelectorLocationsKind SelLocsK, clang::ObjCMethodDecl * Method, ArrayRef<clang::Expr *> Args, clang::SourceLocation RBracLoc, bool isImplicit)
- private ObjCMessageExpr(clang::QualType T, clang::ExprValueKind VK, clang::SourceLocation LBracLoc, clang::TypeSourceInfo * Receiver, clang::Selector Sel, ArrayRef<clang::SourceLocation> SelLocs, clang::SelectorLocationsKind SelLocsK, clang::ObjCMethodDecl * Method, ArrayRef<clang::Expr *> Args, clang::SourceLocation RBracLoc, bool isImplicit)
- private static clang::ObjCMessageExpr * alloc(const clang::ASTContext & C, ArrayRef<clang::Expr *> Args, clang::SourceLocation RBraceLoc, ArrayRef<clang::SourceLocation> SelLocs, clang::Selector Sel, clang::SelectorLocationsKind & SelLocsK)
- private static clang::ObjCMessageExpr * alloc(const clang::ASTContext & C, unsigned int NumArgs, unsigned int NumStoredSelLocs)
- public clang::ObjCMessageExpr::const_arg_iterator arg_begin() const
- public clang::ObjCMessageExpr::arg_iterator arg_begin()
- public clang::ObjCMessageExpr::const_arg_iterator arg_end() const
- public clang::ObjCMessageExpr::arg_iterator arg_end()
- public llvm::iterator_range<const_arg_iterator> arguments() const
- public llvm::iterator_range<arg_iterator> arguments()
- public clang::Stmt::const_child_range children() const
- public clang::Stmt::child_range children()
- public static bool classof(const clang::Stmt * T)
- public const clang::Expr * getArg(unsigned int Arg) const
- public clang::Expr * getArg(unsigned int Arg)
- public const clang::Expr *const * getArgs() const
- public clang::Expr ** getArgs()
- public clang::SourceLocation getBeginLoc() const
- public clang::QualType getCallReturnType(clang::ASTContext & Ctx) const
- public clang::QualType getClassReceiver() const
- public clang::TypeSourceInfo * getClassReceiverTypeInfo() const
- public clang::SourceLocation getEndLoc() const
- public clang::Expr * getInstanceReceiver()
- public const clang::Expr * getInstanceReceiver() const
- public clang::SourceLocation getLeftLoc() const
- public const clang::ObjCMethodDecl * getMethodDecl() const
- public clang::ObjCMethodDecl * getMethodDecl()
- public clang::ObjCMethodFamily getMethodFamily() const
- public unsigned int getNumArgs() const
- public unsigned int getNumSelectorLocs() const
- private unsigned int getNumStoredSelLocs() const
- public clang::ObjCInterfaceDecl * getReceiverInterface() const
- public clang::ObjCMessageExpr::ReceiverKind getReceiverKind() const
- private void * getReceiverPointer() const
- public clang::SourceRange getReceiverRange() const
- public clang::QualType getReceiverType() const
- public clang::SourceLocation getRightLoc() 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
- private const clang::SourceLocation * getStoredSelLocs() const
- private clang::SourceLocation * getStoredSelLocs()
- public clang::SourceLocation getSuperLoc() const
- public clang::QualType getSuperType() const
- private bool hasStandardSelLocs() const
- private void initArgsAndSelLocs(ArrayRef<clang::Expr *> Args, ArrayRef<clang::SourceLocation> SelLocs, clang::SelectorLocationsKind SelLocsK)
- public bool isClassMessage() const
- public bool isDelegateInitCall() const
- public bool isImplicit() const
- public bool isInstanceMessage() const
- private size_t numTrailingObjects(OverloadToken<void *>) const
- public void setArg(unsigned int Arg, clang::Expr * ArgExpr)
- public void setClassReceiver(clang::TypeSourceInfo * TSInfo)
- public void setDelegateInitCall(bool isDelegate)
- public void setInstanceReceiver(clang::Expr * rec)
- public void setMethodDecl(clang::ObjCMethodDecl * MD)
- private void setNumArgs(unsigned int Num)
- private void setReceiverPointer(void * Value)
- public void setSelector(clang::Selector S)
- public void setSourceRange(clang::SourceRange R)
- public void setSuper(clang::SourceLocation Loc, clang::QualType T, bool IsInstanceSuper)
Inherited from Expr:
- public Classify
- public ClassifyLValue
- public ClassifyModifiable
- public EvaluateAsBooleanCondition
- public EvaluateAsConstantExpr
- public EvaluateAsFixedPoint
- public EvaluateAsFloat
- public EvaluateAsInitializer
- public EvaluateAsInt
- public EvaluateAsLValue
- public EvaluateAsRValue
- public EvaluateForOverflow
- public EvaluateKnownConstInt
- public EvaluateKnownConstIntCheckOverflow
- public EvaluateWithSubstitution
- public HasSideEffects
- public IgnoreCasts
- public IgnoreCasts
- public IgnoreConversionOperatorSingleStep
- public IgnoreConversionOperatorSingleStep
- public IgnoreImpCasts
- public IgnoreImpCasts
- public IgnoreImplicit
- public IgnoreImplicit
- public IgnoreImplicitAsWritten
- public IgnoreImplicitAsWritten
- public IgnoreParenBaseCasts
- public IgnoreParenBaseCasts
- public IgnoreParenCasts
- public IgnoreParenCasts
- public IgnoreParenImpCasts
- public IgnoreParenImpCasts
- public IgnoreParenLValueCasts
- public IgnoreParenLValueCasts
- public IgnoreParenNoopCasts
- public IgnoreParenNoopCasts
- public IgnoreParens
- public IgnoreParens
- public IgnoreUnlessSpelledInSource
- public IgnoreUnlessSpelledInSource
- public classof
- public containsErrors
- public containsUnexpandedParameterPack
- public findBoundMemberType
- public getAsBuiltinConstantDeclRef
- public getBestDynamicClassType
- public getBestDynamicClassTypeExpr
- public getDependence
- public getExprLoc
- public getFPFeaturesInEffect
- public getIntegerConstantExpr
- public getObjCProperty
- public getObjectKind
- public getReferencedDeclOfCallee
- public getReferencedDeclOfCallee
- public getSourceBitField
- public getSourceBitField
- public getType
- public getValueKind
- public getValueKindForType
- public hasAnyTypeDependentArguments
- public hasNonTrivialCall
- public hasPlaceholderType
- public hasPlaceholderType
- public isBoundMemberFunction
- public isCXX11ConstantExpr
- public isCXX98IntegralConstantExpr
- public isConstantInitializer
- public isDefaultArgument
- public isEvaluatable
- public isGLValue
- public isImplicitCXXThis
- public isInstantiationDependent
- public isIntegerConstantExpr
- public isKnownToHaveBooleanValue
- public isLValue
- public isModifiableLvalue
- public isNullPointerConstant
- public isOBJCGCCandidate
- public isObjCSelfExpr
- public isOrdinaryOrBitFieldObject
- public isPRValue
- public isPotentialConstantExpr
- public isPotentialConstantExprUnevaluated
- public isReadIfDiscardedInCPlusPlus11
- public isSameComparisonOperand
- public isTemporaryObject
- public isTypeDependent
- public isUnusedResultAWarning
- public isValueDependent
- public isXValue
- public refersToBitField
- public refersToGlobalRegisterVar
- public refersToMatrixElement
- public refersToVectorElement
- protected setDependence
- public setObjectKind
- public setType
- public setValueKind
- public skipRValueSubobjectAdjustments
- public skipRValueSubobjectAdjustments
- public tryEvaluateObjectSize
- public tryEvaluateStrLen
Inherited from ValueStmt:
Inherited from Stmt:
- public EnableStatistics
- public IgnoreContainers
- public IgnoreContainers
- public PrintStats
- public ProcessODRHash
- public Profile
- public addStmtClass
- public child_begin
- public child_begin
- public child_end
- public child_end
- public children
- public children
- public determineLikelihoodConflict
- public dump
- public dump
- public dumpColor
- public dumpPretty
- public getBeginLoc
- public getEndLoc
- public getID
- public getLikelihood
- public getLikelihood
- public getLikelihood
- public getLikelihoodAttr
- public getSourceRange
- public getStmtClass
- public getStmtClassName
- public printJson
- public printPretty
- public printPrettyControlled
- public stripLabelLikeStatements
- public stripLabelLikeStatements
- public viewAST
Methods
¶static clang::ObjCMessageExpr* Create(
const clang::ASTContext& Context,
clang::QualType T,
clang::ExprValueKind VK,
clang::SourceLocation LBracLoc,
clang::Expr* Receiver,
clang::Selector Sel,
ArrayRef<clang::SourceLocation> SeLocs,
clang::ObjCMethodDecl* Method,
ArrayRef<clang::Expr*> Args,
clang::SourceLocation RBracLoc,
bool isImplicit)
static clang::ObjCMessageExpr* Create(
const clang::ASTContext& Context,
clang::QualType T,
clang::ExprValueKind VK,
clang::SourceLocation LBracLoc,
clang::Expr* Receiver,
clang::Selector Sel,
ArrayRef<clang::SourceLocation> SeLocs,
clang::ObjCMethodDecl* Method,
ArrayRef<clang::Expr*> Args,
clang::SourceLocation RBracLoc,
bool isImplicit)
Description
Create an instance message send.
Declared at: clang/include/clang/AST/ExprObjC.h:1195
Parameters
- const clang::ASTContext& Context
- The ASTContext in which this expression will be created.
- clang::QualType T
- The result type of this message.
- clang::ExprValueKind VK
- The value kind of this message. A message returning a l-value or r-value reference will be an l-value or x-value, respectively.
- clang::SourceLocation LBracLoc
- The location of the open square bracket '['.
- clang::Expr* Receiver
- The expression used to produce the object that will receive this message.
- clang::Selector Sel
- The selector used to determine which method gets called.
- ArrayRef<clang::SourceLocation> SeLocs
- clang::ObjCMethodDecl* Method
- The Objective-C method against which this message send was type-checked. May be nullptr.
- ArrayRef<clang::Expr*> Args
- The message send arguments.
- clang::SourceLocation RBracLoc
- The location of the closing square bracket ']'.
- bool isImplicit
¶static clang::ObjCMessageExpr* Create(
const clang::ASTContext& Context,
clang::QualType T,
clang::ExprValueKind VK,
clang::SourceLocation LBracLoc,
clang::TypeSourceInfo* Receiver,
clang::Selector Sel,
ArrayRef<clang::SourceLocation> SelLocs,
clang::ObjCMethodDecl* Method,
ArrayRef<clang::Expr*> Args,
clang::SourceLocation RBracLoc,
bool isImplicit)
static clang::ObjCMessageExpr* Create(
const clang::ASTContext& Context,
clang::QualType T,
clang::ExprValueKind VK,
clang::SourceLocation LBracLoc,
clang::TypeSourceInfo* Receiver,
clang::Selector Sel,
ArrayRef<clang::SourceLocation> SelLocs,
clang::ObjCMethodDecl* Method,
ArrayRef<clang::Expr*> Args,
clang::SourceLocation RBracLoc,
bool isImplicit)
Description
Create a class message send.
Declared at: clang/include/clang/AST/ExprObjC.h:1161
Parameters
- const clang::ASTContext& Context
- The ASTContext in which this expression will be created.
- clang::QualType T
- The result type of this message.
- clang::ExprValueKind VK
- The value kind of this message. A message returning a l-value or r-value reference will be an l-value or x-value, respectively.
- clang::SourceLocation LBracLoc
- The location of the open square bracket '['.
- clang::TypeSourceInfo* Receiver
- The type of the receiver, including source-location information.
- clang::Selector Sel
- The selector used to determine which method gets called.
- ArrayRef<clang::SourceLocation> SelLocs
- clang::ObjCMethodDecl* Method
- The Objective-C method against which this message send was type-checked. May be nullptr.
- ArrayRef<clang::Expr*> Args
- The message send arguments.
- clang::SourceLocation RBracLoc
- The location of the closing square bracket ']'.
- bool isImplicit
¶static clang::ObjCMessageExpr* Create(
const clang::ASTContext& Context,
clang::QualType T,
clang::ExprValueKind VK,
clang::SourceLocation LBracLoc,
clang::SourceLocation SuperLoc,
bool IsInstanceSuper,
clang::QualType SuperType,
clang::Selector Sel,
ArrayRef<clang::SourceLocation> SelLocs,
clang::ObjCMethodDecl* Method,
ArrayRef<clang::Expr*> Args,
clang::SourceLocation RBracLoc,
bool isImplicit)
static clang::ObjCMessageExpr* Create(
const clang::ASTContext& Context,
clang::QualType T,
clang::ExprValueKind VK,
clang::SourceLocation LBracLoc,
clang::SourceLocation SuperLoc,
bool IsInstanceSuper,
clang::QualType SuperType,
clang::Selector Sel,
ArrayRef<clang::SourceLocation> SelLocs,
clang::ObjCMethodDecl* Method,
ArrayRef<clang::Expr*> Args,
clang::SourceLocation RBracLoc,
bool isImplicit)
Description
Create a message send to super.
Declared at: clang/include/clang/AST/ExprObjC.h:1125
Parameters
- const clang::ASTContext& Context
- The ASTContext in which this expression will be created.
- clang::QualType T
- The result type of this message.
- clang::ExprValueKind VK
- The value kind of this message. A message returning a l-value or r-value reference will be an l-value or x-value, respectively.
- clang::SourceLocation LBracLoc
- The location of the open square bracket '['.
- clang::SourceLocation SuperLoc
- The location of the "super" keyword.
- bool IsInstanceSuper
- Whether this is an instance "super" message (otherwise, it's a class "super" message).
- clang::QualType SuperType
- clang::Selector Sel
- The selector used to determine which method gets called.
- ArrayRef<clang::SourceLocation> SelLocs
- clang::ObjCMethodDecl* Method
- The Objective-C method against which this message send was type-checked. May be nullptr.
- ArrayRef<clang::Expr*> Args
- The message send arguments.
- clang::SourceLocation RBracLoc
- The location of the closing square bracket ']'.
- bool isImplicit
¶static clang::ObjCMessageExpr* CreateEmpty(
const clang::ASTContext& Context,
unsigned int NumArgs,
unsigned int NumStoredSelLocs)
static clang::ObjCMessageExpr* CreateEmpty(
const clang::ASTContext& Context,
unsigned int NumArgs,
unsigned int NumStoredSelLocs)
Description
Create an empty Objective-C message expression, to be filled in by subsequent calls.
Declared at: clang/include/clang/AST/ExprObjC.h:1213
Parameters
- const clang::ASTContext& Context
- The context in which the message send will be created.
- unsigned int NumArgs
- The number of message arguments, not including the receiver.
- unsigned int NumStoredSelLocs
¶ObjCMessageExpr(
clang::QualType T,
clang::ExprValueKind VK,
clang::SourceLocation LBracLoc,
clang::SourceLocation SuperLoc,
bool IsInstanceSuper,
clang::QualType SuperType,
clang::Selector Sel,
ArrayRef<clang::SourceLocation> SelLocs,
clang::SelectorLocationsKind SelLocsK,
clang::ObjCMethodDecl* Method,
ArrayRef<clang::Expr*> Args,
clang::SourceLocation RBracLoc,
bool isImplicit)
ObjCMessageExpr(
clang::QualType T,
clang::ExprValueKind VK,
clang::SourceLocation LBracLoc,
clang::SourceLocation SuperLoc,
bool IsInstanceSuper,
clang::QualType SuperType,
clang::Selector Sel,
ArrayRef<clang::SourceLocation> SelLocs,
clang::SelectorLocationsKind SelLocsK,
clang::ObjCMethodDecl* Method,
ArrayRef<clang::Expr*> Args,
clang::SourceLocation RBracLoc,
bool isImplicit)
Declared at: clang/include/clang/AST/ExprObjC.h:993
Parameters
- clang::QualType T
- clang::ExprValueKind VK
- clang::SourceLocation LBracLoc
- clang::SourceLocation SuperLoc
- bool IsInstanceSuper
- clang::QualType SuperType
- clang::Selector Sel
- ArrayRef<clang::SourceLocation> SelLocs
- clang::SelectorLocationsKind SelLocsK
- clang::ObjCMethodDecl* Method
- ArrayRef<clang::Expr*> Args
- clang::SourceLocation RBracLoc
- bool isImplicit
¶ObjCMessageExpr(clang::Stmt::EmptyShell Empty,
unsigned int NumArgs)
ObjCMessageExpr(clang::Stmt::EmptyShell Empty,
unsigned int NumArgs)
Declared at: clang/include/clang/AST/ExprObjC.h:987
Parameters
- clang::Stmt::EmptyShell Empty
- unsigned int NumArgs
¶ObjCMessageExpr(
clang::QualType T,
clang::ExprValueKind VK,
clang::SourceLocation LBracLoc,
clang::Expr* Receiver,
clang::Selector Sel,
ArrayRef<clang::SourceLocation> SelLocs,
clang::SelectorLocationsKind SelLocsK,
clang::ObjCMethodDecl* Method,
ArrayRef<clang::Expr*> Args,
clang::SourceLocation RBracLoc,
bool isImplicit)
ObjCMessageExpr(
clang::QualType T,
clang::ExprValueKind VK,
clang::SourceLocation LBracLoc,
clang::Expr* Receiver,
clang::Selector Sel,
ArrayRef<clang::SourceLocation> SelLocs,
clang::SelectorLocationsKind SelLocsK,
clang::ObjCMethodDecl* Method,
ArrayRef<clang::Expr*> Args,
clang::SourceLocation RBracLoc,
bool isImplicit)
Declared at: clang/include/clang/AST/ExprObjC.h:1015
Parameters
- clang::QualType T
- clang::ExprValueKind VK
- clang::SourceLocation LBracLoc
- clang::Expr* Receiver
- clang::Selector Sel
- ArrayRef<clang::SourceLocation> SelLocs
- clang::SelectorLocationsKind SelLocsK
- clang::ObjCMethodDecl* Method
- ArrayRef<clang::Expr*> Args
- clang::SourceLocation RBracLoc
- bool isImplicit
¶ObjCMessageExpr(
clang::QualType T,
clang::ExprValueKind VK,
clang::SourceLocation LBracLoc,
clang::TypeSourceInfo* Receiver,
clang::Selector Sel,
ArrayRef<clang::SourceLocation> SelLocs,
clang::SelectorLocationsKind SelLocsK,
clang::ObjCMethodDecl* Method,
ArrayRef<clang::Expr*> Args,
clang::SourceLocation RBracLoc,
bool isImplicit)
ObjCMessageExpr(
clang::QualType T,
clang::ExprValueKind VK,
clang::SourceLocation LBracLoc,
clang::TypeSourceInfo* Receiver,
clang::Selector Sel,
ArrayRef<clang::SourceLocation> SelLocs,
clang::SelectorLocationsKind SelLocsK,
clang::ObjCMethodDecl* Method,
ArrayRef<clang::Expr*> Args,
clang::SourceLocation RBracLoc,
bool isImplicit)
Declared at: clang/include/clang/AST/ExprObjC.h:1005
Parameters
- clang::QualType T
- clang::ExprValueKind VK
- clang::SourceLocation LBracLoc
- clang::TypeSourceInfo* Receiver
- clang::Selector Sel
- ArrayRef<clang::SourceLocation> SelLocs
- clang::SelectorLocationsKind SelLocsK
- clang::ObjCMethodDecl* Method
- ArrayRef<clang::Expr*> Args
- clang::SourceLocation RBracLoc
- bool isImplicit
¶static clang::ObjCMessageExpr* alloc(
const clang::ASTContext& C,
ArrayRef<clang::Expr*> Args,
clang::SourceLocation RBraceLoc,
ArrayRef<clang::SourceLocation> SelLocs,
clang::Selector Sel,
clang::SelectorLocationsKind& SelLocsK)
static clang::ObjCMessageExpr* alloc(
const clang::ASTContext& C,
ArrayRef<clang::Expr*> Args,
clang::SourceLocation RBraceLoc,
ArrayRef<clang::SourceLocation> SelLocs,
clang::Selector Sel,
clang::SelectorLocationsKind& SelLocsK)
Declared at: clang/include/clang/AST/ExprObjC.h:1070
Parameters
- const clang::ASTContext& C
- ArrayRef<clang::Expr*> Args
- clang::SourceLocation RBraceLoc
- ArrayRef<clang::SourceLocation> SelLocs
- clang::Selector Sel
- clang::SelectorLocationsKind& SelLocsK
¶static clang::ObjCMessageExpr* alloc(
const clang::ASTContext& C,
unsigned int NumArgs,
unsigned int NumStoredSelLocs)
static clang::ObjCMessageExpr* alloc(
const clang::ASTContext& C,
unsigned int NumArgs,
unsigned int NumStoredSelLocs)
Declared at: clang/include/clang/AST/ExprObjC.h:1076
Parameters
- const clang::ASTContext& C
- unsigned int NumArgs
- unsigned int NumStoredSelLocs
¶clang::ObjCMessageExpr::const_arg_iterator
arg_begin() const
clang::ObjCMessageExpr::const_arg_iterator
arg_begin() const
Declared at: clang/include/clang/AST/ExprObjC.h:1467
¶clang::ObjCMessageExpr::arg_iterator arg_begin()
clang::ObjCMessageExpr::arg_iterator arg_begin()
Declared at: clang/include/clang/AST/ExprObjC.h:1461
¶clang::ObjCMessageExpr::const_arg_iterator
arg_end() const
clang::ObjCMessageExpr::const_arg_iterator
arg_end() const
Declared at: clang/include/clang/AST/ExprObjC.h:1471
¶clang::ObjCMessageExpr::arg_iterator arg_end()
clang::ObjCMessageExpr::arg_iterator arg_end()
Declared at: clang/include/clang/AST/ExprObjC.h:1463
¶llvm::iterator_range<const_arg_iterator>
arguments() const
llvm::iterator_range<const_arg_iterator>
arguments() const
Declared at: clang/include/clang/AST/ExprObjC.h:1457
¶llvm::iterator_range<arg_iterator> arguments()
llvm::iterator_range<arg_iterator> arguments()
Declared at: clang/include/clang/AST/ExprObjC.h:1453
¶clang::Stmt::const_child_range children() const
clang::Stmt::const_child_range children() const
Declared at: clang/include/clang/AST/ExprObjC.h:1448
¶clang::Stmt::child_range children()
clang::Stmt::child_range children()
Declared at: clang/include/clang/AST/ExprObjC.h:1446
¶static bool classof(const clang::Stmt* T)
static bool classof(const clang::Stmt* T)
Declared at: clang/include/clang/AST/ExprObjC.h:1475
Parameters
- const clang::Stmt* T
¶const clang::Expr* getArg(unsigned int Arg) const
const clang::Expr* getArg(unsigned int Arg) const
Declared at: clang/include/clang/AST/ExprObjC.h:1389
Parameters
- unsigned int Arg
¶clang::Expr* getArg(unsigned int Arg)
clang::Expr* getArg(unsigned int Arg)
Description
getArg - Return the specified argument.
Declared at: clang/include/clang/AST/ExprObjC.h:1385
Parameters
- unsigned int Arg
¶const clang::Expr* const* getArgs() const
const clang::Expr* const* getArgs() const
Declared at: clang/include/clang/AST/ExprObjC.h:1379
¶clang::Expr** getArgs()
clang::Expr** getArgs()
Description
Retrieve the arguments to this message, not including the receiver.
Declared at: clang/include/clang/AST/ExprObjC.h:1376
¶clang::SourceLocation getBeginLoc() const
clang::SourceLocation getBeginLoc() const
Declared at: clang/include/clang/AST/ExprObjC.h:1442
¶clang::QualType getCallReturnType(
clang::ASTContext& Ctx) const
clang::QualType getCallReturnType(
clang::ASTContext& Ctx) const
Declared at: clang/include/clang/AST/ExprObjC.h:1231
Parameters
- clang::ASTContext& Ctx
Returns
the return type of the message being sent. This is not always the type of the message expression itself because of references (the expression would not have a reference type). It is also not always the declared return type of the method because of `instancetype` (in that case it's an expression type).
¶clang::QualType getClassReceiver() const
clang::QualType getClassReceiver() const
Description
Returns the type of a class message send, or NULL if the message is not a class message.
Declared at: clang/include/clang/AST/ExprObjC.h:1269
¶clang::TypeSourceInfo* getClassReceiverTypeInfo()
const
clang::TypeSourceInfo* getClassReceiverTypeInfo()
const
Description
Returns a type-source information of a class message send, or nullptr if the message is not a class message.
Declared at: clang/include/clang/AST/ExprObjC.h:1278
¶clang::SourceLocation getEndLoc() const
clang::SourceLocation getEndLoc() const
Declared at: clang/include/clang/AST/ExprObjC.h:1443
¶clang::Expr* getInstanceReceiver()
clang::Expr* getInstanceReceiver()
Description
Returns the object expression (receiver) for an instance message, or null for a message that is not an instance message.
Declared at: clang/include/clang/AST/ExprObjC.h:1250
¶const clang::Expr* getInstanceReceiver() const
const clang::Expr* getInstanceReceiver() const
Declared at: clang/include/clang/AST/ExprObjC.h:1256
¶clang::SourceLocation getLeftLoc() const
clang::SourceLocation getLeftLoc() const
Declared at: clang/include/clang/AST/ExprObjC.h:1406
¶const clang::ObjCMethodDecl* getMethodDecl() const
const clang::ObjCMethodDecl* getMethodDecl() const
Declared at: clang/include/clang/AST/ExprObjC.h:1346
¶clang::ObjCMethodDecl* getMethodDecl()
clang::ObjCMethodDecl* getMethodDecl()
Declared at: clang/include/clang/AST/ExprObjC.h:1353
¶clang::ObjCMethodFamily getMethodFamily() const
clang::ObjCMethodFamily getMethodFamily() const
Declared at: clang/include/clang/AST/ExprObjC.h:1365
¶unsigned int getNumArgs() const
unsigned int getNumArgs() const
Description
Return the number of actual arguments in this message, not counting the receiver.
Declared at: clang/include/clang/AST/ExprObjC.h:1372
¶unsigned int getNumSelectorLocs() const
unsigned int getNumSelectorLocs() const
Declared at: clang/include/clang/AST/ExprObjC.h:1428
¶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/ExprObjC.h:1064
¶clang::ObjCInterfaceDecl* getReceiverInterface()
const
clang::ObjCInterfaceDecl* getReceiverInterface()
const
Description
Retrieve the Objective-C interface to which this message is being directed, if known. This routine cross-cuts all of the different kinds of message sends to determine what the underlying (statically known) type of the receiver will be; use \c getReceiverKind() to determine whether the message is a class or an instance method, whether it is a send to super or not, etc.
Declared at: clang/include/clang/AST/ExprObjC.h:1319
Returns
The Objective-C interface if known, otherwise nullptr.
¶clang::ObjCMessageExpr::ReceiverKind
getReceiverKind() const
clang::ObjCMessageExpr::ReceiverKind
getReceiverKind() const
Description
Determine the kind of receiver that this message is being sent to.
Declared at: clang/include/clang/AST/ExprObjC.h:1224
¶void* getReceiverPointer() const
void* getReceiverPointer() const
Description
Retrieve the pointer value of the message receiver.
Declared at: clang/include/clang/AST/ExprObjC.h:1038
¶clang::SourceRange getReceiverRange() const
clang::SourceRange getReceiverRange() const
Description
Source range of the receiver.
Declared at: clang/include/clang/AST/ExprObjC.h:1234
¶clang::QualType getReceiverType() const
clang::QualType getReceiverType() const
Description
Retrieve the receiver type to which this message is being directed. This routine cross-cuts all of the different kinds of message sends to determine what the underlying (statically known) type of the receiver will be; use \c getReceiverKind() to determine whether the message is a class or an instance method, whether it is a send to super or not, etc.
Declared at: clang/include/clang/AST/ExprObjC.h:1307
Returns
The type of the receiver.
¶clang::SourceLocation getRightLoc() const
clang::SourceLocation getRightLoc() const
Declared at: clang/include/clang/AST/ExprObjC.h:1407
¶clang::SelectorLocationsKind getSelLocsKind()
const
clang::SelectorLocationsKind getSelLocsKind()
const
Declared at: clang/include/clang/AST/ExprObjC.h:1045
¶clang::Selector getSelector() const
clang::Selector getSelector() const
Declared at: clang/include/clang/AST/ExprObjC.h:1339
¶clang::SourceLocation getSelectorLoc(
unsigned int Index) const
clang::SourceLocation getSelectorLoc(
unsigned int Index) const
Declared at: clang/include/clang/AST/ExprObjC.h:1415
Parameters
- unsigned int Index
¶void getSelectorLocs(
SmallVectorImpl<clang::SourceLocation>&
SelLocs) const
void getSelectorLocs(
SmallVectorImpl<clang::SourceLocation>&
SelLocs) const
Declared at: clang/include/clang/AST/ExprObjC.h:1426
Parameters
- SmallVectorImpl<clang::SourceLocation>& SelLocs
¶clang::SourceLocation getSelectorStartLoc() const
clang::SourceLocation getSelectorStartLoc() const
Declared at: clang/include/clang/AST/ExprObjC.h:1409
¶const clang::SourceLocation* getStoredSelLocs()
const
const clang::SourceLocation* getStoredSelLocs()
const
Declared at: clang/include/clang/AST/ExprObjC.h:1058
¶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/ExprObjC.h:1055
¶clang::SourceLocation getSuperLoc() const
clang::SourceLocation getSuperLoc() const
Description
Retrieve the location of the 'super' keyword for a class or instance message to 'super', otherwise an invalid source location.
Declared at: clang/include/clang/AST/ExprObjC.h:1291
¶clang::QualType getSuperType() const
clang::QualType getSuperType() const
Description
Retrieve the type referred to by 'super'. The returned type will either be an ObjCInterfaceType (for an class message to super) or an ObjCObjectPointerType that refers to a class (for an instance message to super);
Declared at: clang/include/clang/AST/ExprObjC.h:1326
¶bool hasStandardSelLocs() const
bool hasStandardSelLocs() const
Declared at: clang/include/clang/AST/ExprObjC.h:1049
¶void initArgsAndSelLocs(
ArrayRef<clang::Expr*> Args,
ArrayRef<clang::SourceLocation> SelLocs,
clang::SelectorLocationsKind SelLocsK)
void initArgsAndSelLocs(
ArrayRef<clang::Expr*> Args,
ArrayRef<clang::SourceLocation> SelLocs,
clang::SelectorLocationsKind SelLocsK)
Declared at: clang/include/clang/AST/ExprObjC.h:1033
Parameters
- ArrayRef<clang::Expr*> Args
- ArrayRef<clang::SourceLocation> SelLocs
- clang::SelectorLocationsKind SelLocsK
¶bool isClassMessage() const
bool isClassMessage() const
Description
Determine whether this is an class message to either a specified class or to super.
Declared at: clang/include/clang/AST/ExprObjC.h:1244
¶bool isDelegateInitCall() const
bool isDelegateInitCall() const
Description
isDelegateInitCall - Answers whether this message send has been tagged as a "delegate init call", i.e. a call to a method in the -init family on self from within an -init method implementation.
Declared at: clang/include/clang/AST/ExprObjC.h:1403
¶bool isImplicit() const
bool isImplicit() const
Description
Indicates whether the message send was implicitly generated by the implementation. If false, it was written explicitly in the source code.
Declared at: clang/include/clang/AST/ExprObjC.h:1220
¶bool isInstanceMessage() const
bool isInstanceMessage() const
Description
Determine whether this is an instance message to either a computed object or to super.
Declared at: clang/include/clang/AST/ExprObjC.h:1238
¶size_t numTrailingObjects(
OverloadToken<void*>) const
size_t numTrailingObjects(
OverloadToken<void*>) const
Declared at: clang/include/clang/AST/ExprObjC.h:1026
Parameters
- OverloadToken<void*>
¶void setArg(unsigned int Arg,
clang::Expr* ArgExpr)
void setArg(unsigned int Arg,
clang::Expr* ArgExpr)
Description
setArg - Set the specified argument.
Declared at: clang/include/clang/AST/ExprObjC.h:1395
Parameters
- unsigned int Arg
- clang::Expr* ArgExpr
¶void setClassReceiver(
clang::TypeSourceInfo* TSInfo)
void setClassReceiver(
clang::TypeSourceInfo* TSInfo)
Declared at: clang/include/clang/AST/ExprObjC.h:1284
Parameters
- clang::TypeSourceInfo* TSInfo
¶void setDelegateInitCall(bool isDelegate)
void setDelegateInitCall(bool isDelegate)
Declared at: clang/include/clang/AST/ExprObjC.h:1404
Parameters
- bool isDelegate
¶void setInstanceReceiver(clang::Expr* rec)
void setInstanceReceiver(clang::Expr* rec)
Description
Turn this message send into an instance message that computes the receiver object with the given expression.
Declared at: clang/include/clang/AST/ExprObjC.h:1262
Parameters
- clang::Expr* rec
¶void setMethodDecl(clang::ObjCMethodDecl* MD)
void setMethodDecl(clang::ObjCMethodDecl* MD)
Declared at: clang/include/clang/AST/ExprObjC.h:1360
Parameters
¶void setNumArgs(unsigned int Num)
void setNumArgs(unsigned int Num)
Declared at: clang/include/clang/AST/ExprObjC.h:1028
Parameters
- unsigned int Num
¶void setReceiverPointer(void* Value)
void setReceiverPointer(void* Value)
Description
Set the pointer value of the message receiver.
Declared at: clang/include/clang/AST/ExprObjC.h:1041
Parameters
- void* Value
¶void setSelector(clang::Selector S)
void setSelector(clang::Selector S)
Declared at: clang/include/clang/AST/ExprObjC.h:1341
Parameters
¶void setSourceRange(clang::SourceRange R)
void setSourceRange(clang::SourceRange R)
Declared at: clang/include/clang/AST/ExprObjC.h:1437
Parameters
¶void setSuper(clang::SourceLocation Loc,
clang::QualType T,
bool IsInstanceSuper)
void setSuper(clang::SourceLocation Loc,
clang::QualType T,
bool IsInstanceSuper)
Declared at: clang/include/clang/AST/ExprObjC.h:1333
Parameters
- clang::SourceLocation Loc
- clang::QualType T
- bool IsInstanceSuper