14 #ifndef LLVM_CLANG_AST_EXPROBJC_H
15 #define LLVM_CLANG_AST_EXPROBJC_H
21 #include "llvm/Support/Compiler.h"
36 String(SL), AtLoc(L) {}
38 :
Expr(ObjCStringLiteralClass, Empty) {}
51 return T->getStmtClass() == ObjCStringLiteralClass;
55 child_range
children() {
return child_range(&String, &String+1); }
69 :
Expr(ObjCBoolLiteralExprClass, Empty) { }
81 return T->getStmtClass() == ObjCBoolLiteralExprClass;
86 return child_range(child_iterator(), child_iterator());
104 SubExpr(E), BoxingMethod(method), Range(R) {}
106 :
Expr(ObjCBoxedExprClass, Empty) {}
124 return T->getStmtClass() == ObjCBoxedExprClass;
128 child_range
children() {
return child_range(&SubExpr, &SubExpr+1); }
133 return reinterpret_cast<Stmt const * const*
>(&SubExpr);
136 return reinterpret_cast<Stmt const * const*
>(&SubExpr + 1);
147 unsigned NumElements;
156 :
Expr(ObjCArrayLiteralClass, Empty), NumElements(NumElements) {}
165 unsigned NumElements);
172 return T->getStmtClass() == ObjCArrayLiteralClass;
180 return getTrailingObjects<Expr *>();
188 assert((Index < NumElements) &&
"Arg access out of range!");
192 assert((Index < NumElements) &&
"Arg access out of range!");
197 return ArrayWithObjectsMethod;
202 return child_range(reinterpret_cast<Stmt **>(
getElements()),
203 reinterpret_cast<Stmt **>(
getElements()) + NumElements);
232 template <>
struct isPodLike<clang::ObjCDictionaryElement> : std::true_type {};
260 ObjCDictionaryLiteral_KeyValuePair,
261 ObjCDictionaryLiteral_ExpansionData> {
263 unsigned NumElements : 31;
272 unsigned HasPackExpansions : 1;
280 size_t numTrailingObjects(OverloadToken<KeyValuePair>)
const {
285 bool HasPackExpansions,
290 bool HasPackExpansions)
291 :
Expr(ObjCDictionaryLiteralClass, Empty), NumElements(NumElements),
292 HasPackExpansions(HasPackExpansions) {}
297 bool HasPackExpansions,
302 unsigned NumElements,
303 bool HasPackExpansions);
310 assert((Index < NumElements) &&
"Arg access out of range!");
311 const KeyValuePair &KV = getTrailingObjects<KeyValuePair>()[Index];
313 if (HasPackExpansions) {
315 getTrailingObjects<ExpansionData>()[Index];
324 {
return DictWithObjectsMethod; }
331 return T->getStmtClass() == ObjCDictionaryLiteralClass;
339 "KeyValuePair is expected size");
341 reinterpret_cast<Stmt **>(getTrailingObjects<KeyValuePair>()),
342 reinterpret_cast<Stmt **>(getTrailingObjects<KeyValuePair>()) +
362 EncodedType->
getType()->isDependentType(),
363 EncodedType->
getType()->isDependentType(),
364 EncodedType->
getType()->isInstantiationDependentType(),
366 EncodedType(EncodedType), AtLoc(at), RParenLoc(rp) {}
380 EncodedType = EncType;
387 return T->getStmtClass() == ObjCEncodeExprClass;
392 return child_range(child_iterator(), child_iterator());
405 SelName(selInfo), AtLoc(at), RParenLoc(rp){}
407 :
Expr(ObjCSelectorExprClass, Empty) {}
424 return T->getStmtClass() == ObjCSelectorExprClass;
429 return child_range(child_iterator(), child_iterator());
449 TheProtocol(protocol), AtLoc(at), ProtoLoc(protoLoc), RParenLoc(rp) {}
451 :
Expr(ObjCProtocolExprClass, Empty) {}
466 return T->getStmtClass() == ObjCProtocolExprClass;
471 return child_range(child_iterator(), child_iterator());
493 bool arrow =
false,
bool freeIvar =
false) :
499 D(d),
Base(base), Loc(l), OpLoc(oploc),
500 IsArrow(arrow), IsFreeIvar(freeIvar) {}
503 :
Expr(ObjCIvarRefExprClass, Empty) {}
530 return T->getStmtClass() == ObjCIvarRefExprClass;
545 llvm::PointerIntPair<NamedDecl*, 1, bool> PropertyOrGetter;
550 enum MethodRefFlags {
552 MethodRef_Getter = 0x1,
553 MethodRef_Setter = 0x2
557 llvm::PointerIntPair<ObjCMethodDecl *, 2, unsigned> SetterAndMethodRefFlags;
570 llvm::PointerUnion3<Stmt*, const Type*, ObjCInterfaceDecl*> Receiver;
576 :
Expr(ObjCPropertyRefExprClass, t, VK, OK,
580 PropertyOrGetter(PD,
false), SetterAndMethodRefFlags(),
581 IdLoc(l), ReceiverLoc(), Receiver(base) {
588 :
Expr(ObjCPropertyRefExprClass, t, VK, OK,
589 false,
false, st->isInstantiationDependentType(),
591 PropertyOrGetter(PD,
false), SetterAndMethodRefFlags(),
592 IdLoc(l), ReceiverLoc(sl), Receiver(st.getTypePtr()) {
599 :
Expr(ObjCPropertyRefExprClass, T, VK, OK,
false,
602 PropertyOrGetter(Getter,
true), SetterAndMethodRefFlags(Setter, 0),
603 IdLoc(IdLoc), ReceiverLoc(), Receiver(Base) {
612 PropertyOrGetter(Getter,
true), SetterAndMethodRefFlags(Setter, 0),
613 IdLoc(IdLoc), ReceiverLoc(SuperLoc), Receiver(SuperTy.getTypePtr()) {
622 PropertyOrGetter(Getter,
true), SetterAndMethodRefFlags(Setter, 0),
623 IdLoc(IdLoc), ReceiverLoc(ReceiverLoc), Receiver(Receiver) {
628 :
Expr(ObjCPropertyRefExprClass, Empty) {}
635 return cast<ObjCPropertyDecl>(PropertyOrGetter.getPointer());
640 return cast_or_null<ObjCMethodDecl>(PropertyOrGetter.getPointer());
645 return SetterAndMethodRefFlags.getPointer();
664 return SetterAndMethodRefFlags.getInt() & MethodRef_Getter;
671 return SetterAndMethodRefFlags.getInt() & MethodRef_Setter;
675 setMethodRefFlag(MethodRef_Getter, val);
679 setMethodRefFlag(MethodRef_Setter, val);
683 return cast<Expr>(Receiver.get<
Stmt*>());
686 return cast<Expr>(Receiver.get<
Stmt*>());
712 return T->getStmtClass() == ObjCPropertyRefExprClass;
717 if (Receiver.is<
Stmt*>()) {
719 return child_range(begin, begin+1);
721 return child_range(child_iterator(), child_iterator());
728 PropertyOrGetter.setPointer(D);
729 PropertyOrGetter.setInt(
false);
730 SetterAndMethodRefFlags.setPointer(
nullptr);
731 SetterAndMethodRefFlags.setInt(methRefFlags);
734 unsigned methRefFlags) {
735 PropertyOrGetter.setPointer(Getter);
736 PropertyOrGetter.setInt(
true);
737 SetterAndMethodRefFlags.setPointer(Setter);
738 SetterAndMethodRefFlags.setInt(methRefFlags);
740 void setBase(
Expr *
Base) { Receiver = Base; }
741 void setSuperReceiver(QualType T) { Receiver = T.getTypePtr(); }
742 void setClassReceiver(ObjCInterfaceDecl *D) { Receiver = D; }
744 void setLocation(SourceLocation L) { IdLoc = L; }
745 void setReceiverLocation(SourceLocation Loc) { ReceiverLoc = Loc; }
747 void setMethodRefFlag(MethodRefFlags flag,
bool val) {
748 unsigned f = SetterAndMethodRefFlags.getInt();
753 SetterAndMethodRefFlags.setInt(f);
766 enum { BASE, KEY, END_EXPR };
767 Stmt* SubExprs[END_EXPR];
781 :
Expr(ObjCSubscriptRefExprClass, T, VK, OK,
788 GetAtIndexMethodDecl(getMethod),
789 SetAtIndexMethodDecl(setMethod)
790 {SubExprs[BASE] = base; SubExprs[KEY] = key;}
793 :
Expr(ObjCSubscriptRefExprClass, Empty) {}
799 return SubExprs[BASE]->getLocStart();
804 return T->getStmtClass() == ObjCSubscriptRefExprClass;
814 return GetAtIndexMethodDecl;
818 return SetAtIndexMethodDecl;
826 return child_range(SubExprs, SubExprs+END_EXPR);
868 enum { NumArgsBitWidth = 16 };
872 unsigned NumArgs : NumArgsBitWidth;
885 unsigned HasMethod : 1;
889 unsigned IsDelegateInitCall : 1;
893 unsigned IsImplicit : 1;
897 unsigned SelLocsKind : 2;
907 size_t numTrailingObjects(OverloadToken<void *>)
const {
return NumArgs + 1; }
909 void setNumArgs(
unsigned Num) {
910 assert((Num >> NumArgsBitWidth) == 0 &&
"Num of args is out of range!");
915 :
Expr(ObjCMessageExprClass, Empty), SelectorOrMethod(0),
Kind(0),
916 HasMethod(0), IsDelegateInitCall(0), IsImplicit(0), SelLocsKind(0) {
923 bool IsInstanceSuper,
958 void *getReceiverPointer()
const {
return *getTrailingObjects<void *>(); }
961 void setReceiverPointer(
void *
Value) {
962 *getTrailingObjects<void *>() = Value;
968 bool hasStandardSelLocs()
const {
975 return getTrailingObjects<SourceLocation>();
978 return getTrailingObjects<SourceLocation>();
983 unsigned getNumStoredSelLocs()
const {
984 if (hasStandardSelLocs())
997 unsigned NumStoredSelLocs);
1041 bool IsInstanceSuper,
1127 unsigned NumStoredSelLocs);
1157 return static_cast<Expr *
>(getReceiverPointer());
1169 setReceiverPointer(rec);
1176 return TSInfo->getType();
1191 setReceiverPointer(TSInfo);
1253 return reinterpret_cast<const ObjCMethodDecl *
>(SelectorOrMethod);
1267 SelectorOrMethod =
reinterpret_cast<uintptr_t>(MD);
1282 return reinterpret_cast<Expr **
>(getTrailingObjects<void *>() + 1);
1285 return reinterpret_cast<const Expr *
const *
>(getTrailingObjects<void *>() +
1291 assert(Arg < NumArgs &&
"Arg access out of range!");
1295 assert(Arg < NumArgs &&
"Arg access out of range!");
1300 assert(Arg < NumArgs &&
"Arg access out of range!");
1320 if (hasStandardSelLocs())
1323 llvm::makeArrayRef(const_cast<Expr**>(
getArgs()),
1326 return getStoredSelLocs()[Index];
1348 return T->getStmtClass() == ObjCMessageExprClass;
1361 llvm::iterator_range<const_arg_iterator>
arguments()
const {
1367 return reinterpret_cast<Stmt **
>(
getArgs() + NumArgs);
1370 return reinterpret_cast<Stmt const * const*
>(
getArgs());
1373 return reinterpret_cast<Stmt const * const*
>(
getArgs() + NumArgs);
1402 Base(base), IsaMemberLoc(l), OpLoc(oploc), IsArrow(isarrow) {}
1422 return getBase()->getLocStart();
1426 return getBase()->getLocEnd();
1434 return T->getStmtClass() == ObjCIsaExprClass;
1473 ObjCIndirectCopyRestoreExprBits.ShouldCopy =
shouldCopy;
1477 :
Expr(ObjCIndirectCopyRestoreExprClass, Empty) { }
1486 setShouldCopy(shouldCopy);
1494 bool shouldCopy()
const {
return ObjCIndirectCopyRestoreExprBits.ShouldCopy; }
1496 child_range
children() {
return child_range(&Operand, &Operand+1); }
1500 return Operand->getLocStart();
1509 return s->getStmtClass() == ObjCIndirectCopyRestoreExprClass;
1526 friend TrailingObjects;
1536 CK, Operand, 0, TSInfo),
1537 LParenLoc(LParenLoc), BridgeKeywordLoc(BridgeKeywordLoc), Kind(Kind) { }
1562 return T->getStmtClass() == ObjCBridgedCastExprClass;
1589 VersionToCheck(VersionToCheck), AtLoc(AtLoc), RParen(RParen) {}
1592 :
Expr(ObjCAvailabilityCheckExprClass, Shell) {}
1603 return child_range(child_iterator(), child_iterator());
1607 return T->getStmtClass() == ObjCAvailabilityCheckExprClass;
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
The receiver is the instance of the superclass object.
For nullary selectors, immediately before the end: "[foo release]" / "-(void)release;" Or with a spac...
ConstExprIterator const_arg_iterator
SourceLocation getEnd() const
const Expr * getBase() const
Selector getGetterSelector() const
The receiver is an object instance.
Smart pointer class that efficiently represents Objective-C method names.
SourceLocation getLocStart() const LLVM_READONLY
A (possibly-)qualified type.
static bool classof(const Stmt *T)
bool containsUnexpandedParameterPack() const
Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates)...
SourceLocation getLocEnd() const LLVM_READONLY
Represents a version number in the form major[.minor[.subminor[.build]]].
ObjCMethodFamily getMethodFamily() const
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getLocation() const
Expr(StmtClass SC, QualType T, ExprValueKind VK, ExprObjectKind OK, bool TD, bool VD, bool ID, bool ContainsUnexpandedParameterPack)
QualType getClassReceiver() const
Returns the type of a class message send, or NULL if the message is not a class message.
bool isDelegateInitCall() const
isDelegateInitCall - Answers whether this message send has been tagged as a "delegate init call"...
SourceLocation EllipsisLoc
The location of the ellipsis, if this element is a pack expansion.
ObjCBridgeCastKind
The kind of bridging performed by the Objective-C bridge cast.
bool isMessagingGetter() const
True if the property reference will result in a message to the getter.
static ObjCMessageExpr * Create(const ASTContext &Context, QualType T, ExprValueKind VK, SourceLocation LBracLoc, SourceLocation SuperLoc, bool IsInstanceSuper, QualType SuperType, Selector Sel, ArrayRef< SourceLocation > SelLocs, ObjCMethodDecl *Method, ArrayRef< Expr * > Args, SourceLocation RBracLoc, bool isImplicit)
Create a message send to super.
const Expr * getInstanceReceiver() const
void setAtLoc(SourceLocation L)
ObjCMethodDecl * getAtIndexMethodDecl() const
void setRBracket(SourceLocation RB)
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getProtocolIdLoc() const
const Expr * getSubExpr() const
void getSelectorLocs(SmallVectorImpl< SourceLocation > &SelLocs) const
ObjCStringLiteral(EmptyShell Empty)
SourceLocation getRParenLoc() const
SourceLocation getExprLoc() const LLVM_READONLY
void setSuper(SourceLocation Loc, QualType T, bool IsInstanceSuper)
The base class of the type hierarchy.
SourceLocation getLocStart() const LLVM_READONLY
unsigned getNumSelectorLocs() const
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
bool isMessagingSetter() const
True if the property reference will result in a message to the setter.
A container of type source information.
SourceLocation getLocStart() const LLVM_READONLY
void setInstanceReceiver(Expr *rec)
Turn this message send into an instance message that computes the receiver object with the given expr...
void * getAsOpaquePtr() const
SourceLocation getLocEnd() const LLVM_READONLY
ObjCBoxedExpr(Expr *E, QualType T, ObjCMethodDecl *method, SourceRange R)
static ObjCDictionaryLiteral * CreateEmpty(const ASTContext &C, unsigned NumElements, bool HasPackExpansions)
void setLocation(SourceLocation L)
bool isClassMessage() const
Determine whether this is an class message to either a specified class or to super.
SourceLocation getAtLoc() const
void setDelegateInitCall(bool isDelegate)
void setProtocol(ObjCProtocolDecl *P)
void * getAsOpaquePtr() const
ObjCPropertyRefExpr(ObjCPropertyDecl *PD, QualType t, ExprValueKind VK, ExprObjectKind OK, SourceLocation l, Expr *base)
ObjCDictionaryElement getKeyValueElement(unsigned Index) const
bool isExplicitProperty() const
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
unsigned NumExpansionsPlusOne
If non-zero, the number of elements that this pack expansion will expand to (+1). ...
void setOpLoc(SourceLocation L)
ObjCMethodDecl - Represents an instance or class method declaration.
ObjCBridgedCastExpr(EmptyShell Shell)
Construct an empty Objective-C bridged cast.
static bool classof(const Stmt *T)
ObjCPropertyRefExpr(EmptyShell Empty)
SourceLocation getLParenLoc() const
ReceiverKind
The kind of receiver this message is sending to.
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation getLocEnd() const LLVM_READONLY
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
static bool classof(const Stmt *T)
SourceLocation getAtLoc() const
SourceLocation getLocEnd() const LLVM_READONLY
void setAtLoc(SourceLocation L)
SourceLocation getIsaMemberLoc() const
getMemberLoc - Return the location of the "member", in X->F, it is the location of 'F'...
bool hasVersion() const
This may be '*', in which case this should fold to true.
SourceLocation getBaseLocEnd() const LLVM_READONLY
SourceLocation getLocStart() const LLVM_READONLY
ObjCProtocolDecl * getProtocol() const
QualType getReceiverType() const
Retrieve the receiver type to which this message is being directed.
An element in an Objective-C dictionary literal.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
ObjCInterfaceDecl * getClassReceiver() const
const Expr * getArg(unsigned Arg) const
Internal struct for storing Key/value pair.
ObjCMethodFamily
A family of Objective-C methods.
static ObjCArrayLiteral * Create(const ASTContext &C, ArrayRef< Expr * > Elements, QualType T, ObjCMethodDecl *Method, SourceRange SR)
ObjCPropertyRefExpr(ObjCMethodDecl *Getter, ObjCMethodDecl *Setter, QualType T, ExprValueKind VK, ExprObjectKind OK, SourceLocation IdLoc, Expr *Base)
static ObjCMessageExpr * CreateEmpty(const ASTContext &Context, unsigned NumArgs, unsigned NumStoredSelLocs)
Create an empty Objective-C message expression, to be filled in by subsequent calls.
StringLiteral * getString()
ObjCEncodeExpr(EmptyShell Empty)
SourceLocation getLocEnd() const LLVM_READONLY
ObjCSubscriptRefExpr(Expr *base, Expr *key, QualType T, ExprValueKind VK, ExprObjectKind OK, ObjCMethodDecl *getMethod, ObjCMethodDecl *setMethod, SourceLocation RB)
SourceLocation getAtLoc() const
ObjCBoxedExpr(EmptyShell Empty)
SourceLocation getLocEnd() const LLVM_READONLY
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp, [NSNumber numberWithInt:42]];.
ObjCSelectorExpr(QualType T, Selector selInfo, SourceLocation at, SourceLocation rp)
An r-value expression (a pr-value in the C++11 taxonomy) produces a temporary value.
SourceLocation getSuperLoc() const
Retrieve the location of the 'super' keyword for a class or instance message to 'super', otherwise an invalid source location.
bool shouldCopy() const
shouldCopy - True if we should do the 'copy' part of the copy-restore.
ObjCBoolLiteralExpr(bool val, QualType Ty, SourceLocation l)
ObjCMethodDecl * getBoxingMethod() const
SelectorLocationsKind
Whether all locations of the selector identifiers are in a "standard" position.
bool isSpecificPlaceholderType(unsigned K) const
Test for a specific placeholder type.
ObjCBridgeCastKind getBridgeKind() const
Determine which kind of bridge is being performed via this cast.
SourceLocation getLocStart() const LLVM_READONLY
ObjCMethodFamily getMethodFamily() const
Determines the family of this method.
QualType getSuperType() const
Retrieve the type referred to by 'super'.
void setSelector(Selector S)
bool isSuperReceiver() const
void setLocation(SourceLocation L)
Selector getSelector() const
bool isValueDependent() const
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
Selector getSetterName() const
SourceLocation getLocEnd() const LLVM_READONLY
void setString(StringLiteral *S)
ObjCStringLiteral, used for Objective-C string literals i.e.
static bool classof(const Stmt *T)
StringRef getBridgeKindName() const
Retrieve the kind of bridge being performed as a string.
ObjCIsaExpr(Expr *base, bool isarrow, SourceLocation l, SourceLocation oploc, QualType ty)
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Represents an Objective-C protocol declaration.
Expr * Key
The key for the dictionary element.
SourceLocation getLocStart() const LLVM_READONLY
An ordinary object is located at an address in memory.
SourceLocation getLocStart() const LLVM_READONLY
const Expr * getBase() const
Represents an ObjC class declaration.
ObjCMethodDecl * setAtIndexMethodDecl() const
ExprIterator arg_iterator
ObjCBoolLiteralExpr(EmptyShell Empty)
SourceLocation getReceiverLocation() const
SourceLocation getRParenLoc() const
VersionTuple getVersion()
SourceLocation getLocEnd() const LLVM_READONLY
static bool classof(const Stmt *T)
bool isInstanceMessage() const
Determine whether this is an instance message to either a computed object or to super.
CastKind
CastKind - The kind of operation required for a conversion.
SourceRange getSourceRange() const LLVM_READONLY
TypeSourceInfo * getEncodedTypeSourceInfo() const
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on a template...
bool isPackExpansion() const
Determines whether this dictionary element is a pack expansion.
bool isUnarySelector() const
SourceLocation getOpLoc() const
void setIsMessagingGetter(bool val=true)
ObjCAvailabilityCheckExpr(VersionTuple VersionToCheck, SourceLocation AtLoc, SourceLocation RParen, QualType Ty)
ObjCEncodeExpr(QualType T, TypeSourceInfo *EncodedType, SourceLocation at, SourceLocation rp)
const ObjCMethodDecl * getMethodDecl() const
const_arg_iterator arg_begin() const
Expr - This represents one expression.
ObjCIvarRefExpr(EmptyShell Empty)
ObjCIsaExpr(EmptyShell Empty)
Build an empty expression.
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
SourceLocation getLocStart() const LLVM_READONLY
unsigned getNumArgs() const
SourceLocation getExprLoc() const LLVM_READONLY
SourceRange getReceiverRange() const
Source range of the receiver.
ObjCMethodDecl * getImplicitPropertyGetter() const
SourceLocation getLocStart() const LLVM_READONLY
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
ObjCInterfaceDecl * getReceiverInterface() const
Retrieve the Objective-C interface to which this message is being directed, if known.
ObjCSelectorExpr used for @selector in Objective-C.
Expr ** getArgs()
Retrieve the arguments to this message, not including the receiver.
ObjCPropertyRefExpr(ObjCPropertyDecl *PD, QualType t, ExprValueKind VK, ExprObjectKind OK, SourceLocation l, SourceLocation sl, QualType st)
static ObjCDictionaryLiteral * Create(const ASTContext &C, ArrayRef< ObjCDictionaryElement > VK, bool HasPackExpansions, QualType T, ObjCMethodDecl *method, SourceRange SR)
static bool classof(const Stmt *T)
Selector getSelector() const
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c array literal.
ObjCStringLiteral(StringLiteral *SL, QualType T, SourceLocation L)
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
SourceLocation getLocation() const
Expr * getElement(unsigned Index)
getExpr - Return the Expr at the specified index.
Optional< unsigned > NumExpansions
The number of elements this pack expansion will expand to, if this is a pack expansion and is known...
void setRParenLoc(SourceLocation L)
An expression that sends a message to the given Objective-C object or class.
static bool classof(const Stmt *T)
void setAtLoc(SourceLocation L)
const ObjCIvarDecl * getDecl() const
void setRParenLoc(SourceLocation L)
The result type of a method or function.
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
ObjCIvarRefExpr(ObjCIvarDecl *d, QualType t, SourceLocation l, SourceLocation oploc, Expr *base, bool arrow=false, bool freeIvar=false)
Expr * getArg(unsigned Arg)
getArg - Return the specified argument.
SourceLocation getRightLoc() const
SourceLocation getLocEnd() const LLVM_READONLY
ObjCPropertyRefExpr(ObjCMethodDecl *Getter, ObjCMethodDecl *Setter, QualType T, ExprValueKind VK, ExprObjectKind OK, SourceLocation IdLoc, SourceLocation ReceiverLoc, ObjCInterfaceDecl *Receiver)
ConstExprIterator const_arg_iterator
SourceLocation getAtLoc() const
ObjCSubscriptRefExpr(EmptyShell Empty)
ObjCIndirectCopyRestoreExpr(Expr *operand, QualType type, bool shouldCopy)
static bool classof(const Stmt *T)
bool isIntegralOrEnumerationType() const
Determine whether this type is an integral or enumeration type.
SourceLocation getRBracket() const
const Expr * getElement(unsigned Index) const
Encodes a location in the source.
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getLocStart() const LLVM_READONLY
ObjCSelectorExpr(EmptyShell Empty)
void setIsMessagingSetter(bool val=true)
const_arg_iterator arg_begin() const
bool isValid() const
Return true if this is a valid SourceLocation object.
SourceRange getSourceRange() const LLVM_READONLY
static bool classof(const Stmt *T)
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
QualType getReceiverType(const ASTContext &ctx) const
Determine the type of the base, regardless of the kind of receiver.
const Expr *const * getArgs() const
TypeSourceInfo * getClassReceiverTypeInfo() const
Returns a type-source information of a class message send, or NULL if the message is not a class mess...
void setClassReceiver(TypeSourceInfo *TSInfo)
SourceLocation getAtLoc() const
void setIsFreeIvar(bool A)
ObjCProtocolExpr used for protocol expression in Objective-C.
SourceLocation getLocStart() const LLVM_READONLY
Represents one property declaration in an Objective-C interface.
SourceLocation getBegin() const
bool isTypeDependent() const
isTypeDependent - Determines whether this expression is type-dependent (C++ [temp.dep.expr]), which means that its type could change from one template instantiation to the next.
llvm::iterator_range< const_arg_iterator > arguments() const
SourceLocation getSelectorStartLoc() const
void setBaseExpr(Stmt *S)
void setEncodedTypeSourceInfo(TypeSourceInfo *EncType)
ObjCBoxedExpr - used for generalized expression boxing.
static QualType getFromOpaquePtr(const void *Ptr)
bool isObjectReceiver() const
QualType getType() const
Return the type wrapped by this type source info.
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
const Expr * getSubExpr() const
Expr * Value
The value of the dictionary element.
SourceRange getSourceRange() const
Expr ** getElements()
Retrieve elements of array of literals.
const Expr *const * getElements() const
Retrieve elements of array of literals.
Expr * getInstanceReceiver()
Returns the object expression (receiver) for an instance message, or null for a message that is not a...
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers...
bool isImplicitProperty() const
SourceLocation getSelectorLoc(unsigned Index) const
SourceLocation getOpLoc() const
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
SourceLocation getLocStart() const LLVM_READONLY
bool empty() const
Determine whether this version information is empty (e.g., all version components are zero)...
Reads an AST files chain containing the contents of a translation unit.
void setAtLoc(SourceLocation L)
bool isClassReceiver() const
SourceLocation EllipsisLoc
The location of the ellipsis, if this is a pack expansion.
void setDecl(ObjCIvarDecl *d)
A runtime availability query.
static bool classof(const Stmt *T)
Selector getGetterName() const
Selector getSelector() const
ObjCMethodDecl * getArrayWithObjectsMethod() const
detail::InMemoryDirectory::const_iterator E
ObjCMethodFamily getMethodFamily() const
Derive the conventional family of this method.
static bool classof(const Stmt *T)
ExplicitCastExpr - An explicit cast written in the source code.
void setSelector(Selector S)
void setMethodDecl(ObjCMethodDecl *MD)
SourceLocation getLocEnd() const
Expr * getBaseExpr() const
ObjCMethodDecl * getDictWithObjectsMethod() const
static bool classof(const Stmt *T)
SourceLocation getLeftLoc() const
const_arg_iterator arg_end() const
SourceLocation getLocEnd() const LLVM_READONLY
ObjCPropertyRefExpr(ObjCMethodDecl *Getter, ObjCMethodDecl *Setter, QualType T, ExprValueKind VK, ExprObjectKind OK, SourceLocation IdLoc, SourceLocation SuperLoc, QualType SuperTy)
SourceLocation getBridgeKeywordLoc() const
The location of the bridge keyword.
ObjCEncodeExpr, used for @encode in Objective-C.
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]".
static bool classof(const Stmt *s)
ObjCAvailabilityCheckExpr(EmptyShell Shell)
ObjCBridgedCastExpr(SourceLocation LParenLoc, ObjCBridgeCastKind Kind, CastKind CK, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *Operand)
QualType getSuperReceiverType() const
Expr * getKeyExpr() const
unsigned getNumArgs() const
Return the number of actual arguments in this message, not counting the receiver. ...
ObjCProtocolExpr(EmptyShell Empty)
void setRParenLoc(SourceLocation L)
ObjCPropertyDecl * getExplicitProperty() const
A bitfield object is a bitfield on a C or C++ record.
ObjCIvarRefExpr - A reference to an ObjC instance variable.
const StringLiteral * getString() const
Selector getSetterSelector() const
llvm::iterator_range< arg_iterator > arguments()
void setSourceRange(SourceRange R)
QualType getEncodedType() const
ObjCIvarDecl - Represents an ObjC instance variable.
bool isImplicit() const
Indicates whether the message send was implicitly generated by the implementation.
SourceLocation getLocEnd() const LLVM_READONLY
void setIsaMemberLoc(SourceLocation L)
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getLocStart() const LLVM_READONLY
const_arg_iterator arg_end() const
SourceLocation getLocStart() const
SourceLocation getLocation() const
StringLiteral - This represents a string literal expression, e.g.
void setOpLoc(SourceLocation L)
Internal struct to describes an element that is a pack expansion, used if any of the elements in the ...
static bool classof(const Stmt *T)
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
bool isArraySubscriptRefExpr() const
static ObjCArrayLiteral * CreateEmpty(const ASTContext &C, unsigned NumElements)
ObjCProtocolExpr(QualType T, ObjCProtocolDecl *protocol, SourceLocation at, SourceLocation protoLoc, SourceLocation rp)
static bool classof(const Stmt *T)
An l-value expression is a reference to an object with independent storage.
A trivial tuple used to represent a source range.
ObjCMethodDecl * getMethodDecl()
SourceLocation getLocEnd() const LLVM_READONLY
The receiver is a superclass.
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
static bool classof(const Stmt *T)
void setArg(unsigned Arg, Expr *ArgExpr)
setArg - Set the specified argument.
ObjCMethodDecl * getImplicitPropertySetter() const
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c dictionary literal.
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getRParenLoc() const