13 #ifndef LLVM_CLANG_AST_EXPROBJC_H 14 #define LLVM_CLANG_AST_EXPROBJC_H 27 #include "llvm/ADT/ArrayRef.h" 28 #include "llvm/ADT/None.h" 29 #include "llvm/ADT/Optional.h" 30 #include "llvm/ADT/PointerIntPair.h" 31 #include "llvm/ADT/PointerUnion.h" 32 #include "llvm/ADT/StringRef.h" 33 #include "llvm/ADT/iterator_range.h" 34 #include "llvm/Support/Casting.h" 35 #include "llvm/Support/Compiler.h" 36 #include "llvm/Support/TrailingObjects.h" 37 #include "llvm/Support/VersionTuple.h" 38 #include "llvm/Support/type_traits.h" 46 class CXXBaseSpecifier;
58 String(SL), AtLoc(L) {}
60 :
Expr(ObjCStringLiteralClass, Empty) {}
95 :
Expr(ObjCBoolLiteralExprClass, Empty) {}
138 SubExpr(E), BoxingMethod(method), Range(R) {}
140 :
Expr(ObjCBoxedExprClass, Empty) {}
152 return !BoxingMethod && SubExpr;
174 return reinterpret_cast<Stmt const * const*
>(&SubExpr);
178 return reinterpret_cast<Stmt const * const*
>(&SubExpr + 1);
191 unsigned NumElements;
200 :
Expr(ObjCArrayLiteralClass, Empty), NumElements(NumElements) {}
212 unsigned NumElements);
223 return getTrailingObjects<Expr *>();
231 assert((Index < NumElements) &&
"Arg access out of range!");
232 return getElements()[Index];
235 assert((Index < NumElements) &&
"Arg access out of range!");
236 return getElements()[Index];
240 return ArrayWithObjectsMethod;
245 return child_range(reinterpret_cast<Stmt **>(getElements()),
246 reinterpret_cast<Stmt **>(getElements()) + NumElements);
307 ObjCDictionaryLiteral_KeyValuePair,
308 ObjCDictionaryLiteral_ExpansionData> {
310 unsigned NumElements : 31;
319 unsigned HasPackExpansions : 1;
328 bool HasPackExpansions,
333 bool HasPackExpansions)
334 :
Expr(ObjCDictionaryLiteralClass, Empty), NumElements(NumElements),
335 HasPackExpansions(HasPackExpansions) {}
337 size_t numTrailingObjects(OverloadToken<KeyValuePair>)
const {
348 bool HasPackExpansions,
353 unsigned NumElements,
354 bool HasPackExpansions);
361 assert((Index < NumElements) &&
"Arg access out of range!");
362 const KeyValuePair &KV = getTrailingObjects<KeyValuePair>()[Index];
364 if (HasPackExpansions) {
366 getTrailingObjects<ExpansionData>()[Index];
375 return DictWithObjectsMethod;
387 "KeyValuePair is expected size");
389 reinterpret_cast<Stmt **>(getTrailingObjects<KeyValuePair>()),
390 reinterpret_cast<Stmt **>(getTrailingObjects<KeyValuePair>()) +
415 EncodedType->
getType()->isDependentType(),
416 EncodedType->
getType()->isDependentType(),
417 EncodedType->
getType()->isInstantiationDependentType(),
419 EncodedType(EncodedType), AtLoc(at), RParenLoc(rp) {}
433 EncodedType = EncType;
463 SelName(selInfo), AtLoc(at), RParenLoc(rp) {}
465 :
Expr(ObjCSelectorExprClass, Empty) {}
515 TheProtocol(protocol), AtLoc(at), ProtoLoc(protoLoc), RParenLoc(rp) {}
517 :
Expr(ObjCProtocolExprClass, Empty) {}
564 bool arrow =
false,
bool freeIvar =
false)
570 D(d), Base(base), Loc(l), OpLoc(oploc), IsArrow(arrow),
571 IsFreeIvar(freeIvar) {}
574 :
Expr(ObjCIvarRefExprClass, Empty) {}
593 return isFreeIvar() ? Loc : getBase()->getBeginLoc();
620 llvm::PointerIntPair<NamedDecl *, 1, bool> PropertyOrGetter;
625 enum MethodRefFlags {
627 MethodRef_Getter = 0x1,
628 MethodRef_Setter = 0x2
632 llvm::PointerIntPair<ObjCMethodDecl *, 2, unsigned> SetterAndMethodRefFlags;
645 llvm::PointerUnion3<Stmt *, const Type *, ObjCInterfaceDecl *> Receiver;
651 :
Expr(ObjCPropertyRefExprClass, t, VK, OK,
655 PropertyOrGetter(PD,
false), IdLoc(l), Receiver(base) {
662 :
Expr(ObjCPropertyRefExprClass, t, VK, OK,
663 false,
false, st->isInstantiationDependentType(),
665 PropertyOrGetter(PD,
false), IdLoc(l), ReceiverLoc(sl),
666 Receiver(st.getTypePtr()) {
673 :
Expr(ObjCPropertyRefExprClass, T, VK, OK,
false,
676 PropertyOrGetter(Getter,
true), SetterAndMethodRefFlags(Setter, 0),
677 IdLoc(IdLoc), Receiver(Base) {
686 PropertyOrGetter(Getter,
true), SetterAndMethodRefFlags(Setter, 0),
687 IdLoc(IdLoc), ReceiverLoc(SuperLoc), Receiver(SuperTy.getTypePtr()) {
696 PropertyOrGetter(Getter,
true), SetterAndMethodRefFlags(Setter, 0),
697 IdLoc(IdLoc), ReceiverLoc(ReceiverLoc), Receiver(Receiver) {
702 :
Expr(ObjCPropertyRefExprClass, Empty) {}
708 assert(!isImplicitProperty());
709 return cast<ObjCPropertyDecl>(PropertyOrGetter.getPointer());
713 assert(isImplicitProperty());
714 return cast_or_null<ObjCMethodDecl>(PropertyOrGetter.getPointer());
718 assert(isImplicitProperty());
719 return SetterAndMethodRefFlags.getPointer();
723 if (isImplicitProperty())
724 return getImplicitPropertyGetter()->getSelector();
725 return getExplicitProperty()->getGetterName();
729 if (isImplicitProperty())
730 return getImplicitPropertySetter()->getSelector();
731 return getExplicitProperty()->getSetterName();
738 return SetterAndMethodRefFlags.getInt() & MethodRef_Getter;
745 return SetterAndMethodRefFlags.getInt() & MethodRef_Setter;
749 setMethodRefFlag(MethodRef_Getter, val);
753 setMethodRefFlag(MethodRef_Setter, val);
757 return cast<Expr>(Receiver.get<
Stmt*>());
760 return cast<Expr>(Receiver.get<
Stmt*>());
783 return isObjectReceiver() ? getBase()->getBeginLoc()
784 : getReceiverLocation();
791 if (Receiver.is<
Stmt*>()) {
792 Stmt **begin =
reinterpret_cast<Stmt**
>(&Receiver);
812 PropertyOrGetter.setPointer(D);
813 PropertyOrGetter.setInt(
false);
814 SetterAndMethodRefFlags.setPointer(
nullptr);
815 SetterAndMethodRefFlags.setInt(methRefFlags);
819 unsigned methRefFlags) {
820 PropertyOrGetter.setPointer(Getter);
821 PropertyOrGetter.setInt(
true);
822 SetterAndMethodRefFlags.setPointer(Setter);
823 SetterAndMethodRefFlags.setInt(methRefFlags);
826 void setBase(
Expr *
Base) { Receiver = Base; }
831 void setReceiverLocation(
SourceLocation Loc) { ReceiverLoc = Loc; }
833 void setMethodRefFlag(MethodRefFlags flag,
bool val) {
834 unsigned f = SetterAndMethodRefFlags.getInt();
839 SetterAndMethodRefFlags.setInt(f);
852 enum { BASE, KEY, END_EXPR };
853 Stmt* SubExprs[END_EXPR];
866 :
Expr(ObjCSubscriptRefExprClass, T, VK, OK,
873 RBracket(RB), GetAtIndexMethodDecl(getMethod),
874 SetAtIndexMethodDecl(setMethod) {
875 SubExprs[BASE] = base; SubExprs[KEY] = key;
879 :
Expr(ObjCSubscriptRefExprClass, Empty) {}
897 return GetAtIndexMethodDecl;
901 return SetAtIndexMethodDecl;
905 return getKeyExpr()->getType()->isIntegralOrEnumerationType();
958 enum { NumArgsBitWidth = 16 };
962 unsigned NumArgs : NumArgsBitWidth;
975 unsigned HasMethod : 1;
979 unsigned IsDelegateInitCall : 1;
983 unsigned IsImplicit : 1;
987 unsigned SelLocsKind : 2;
998 :
Expr(ObjCMessageExprClass, Empty),
Kind(0), HasMethod(
false),
999 IsDelegateInitCall(
false), IsImplicit(
false), SelLocsKind(0) {
1000 setNumArgs(NumArgs);
1006 bool IsInstanceSuper,
1036 size_t numTrailingObjects(OverloadToken<void *>)
const {
return NumArgs + 1; }
1038 void setNumArgs(
unsigned Num) {
1039 assert((Num >> NumArgsBitWidth) == 0 &&
"Num of args is out of range!");
1048 void *getReceiverPointer()
const {
return *getTrailingObjects<void *>(); }
1051 void setReceiverPointer(
void *
Value) {
1052 *getTrailingObjects<void *>() = Value;
1059 bool hasStandardSelLocs()
const {
1066 return getTrailingObjects<SourceLocation>();
1069 return getTrailingObjects<SourceLocation>();
1074 unsigned getNumStoredSelLocs()
const {
1075 if (hasStandardSelLocs())
1077 return getNumSelectorLocs();
1088 unsigned NumStoredSelLocs);
1139 bool IsInstanceSuper,
1225 unsigned NumStoredSelLocs);
1249 return getReceiverKind() == Instance || getReceiverKind() == SuperInstance;
1255 return getReceiverKind() == Class || getReceiverKind() == SuperClass;
1261 if (getReceiverKind() == Instance)
1262 return static_cast<Expr *
>(getReceiverPointer());
1274 setReceiverPointer(rec);
1281 return TSInfo->getType();
1289 if (getReceiverKind() == Class)
1296 setReceiverPointer(TSInfo);
1302 if (getReceiverKind() == SuperInstance || getReceiverKind() == SuperClass)
1337 if (getReceiverKind() == SuperInstance || getReceiverKind() == SuperClass)
1344 Kind = IsInstanceSuper? SuperInstance : SuperClass;
1358 return reinterpret_cast<const ObjCMethodDecl *
>(SelectorOrMethod);
1372 SelectorOrMethod =
reinterpret_cast<uintptr_t>(MD);
1376 if (HasMethod)
return getMethodDecl()->getMethodFamily();
1377 return getSelector().getMethodFamily();
1387 return reinterpret_cast<Expr **
>(getTrailingObjects<void *>() + 1);
1390 return reinterpret_cast<const Expr *
const *
>(getTrailingObjects<void *>() +
1396 assert(Arg < NumArgs &&
"Arg access out of range!");
1397 return getArgs()[Arg];
1400 assert(Arg < NumArgs &&
"Arg access out of range!");
1401 return getArgs()[Arg];
1406 assert(Arg < NumArgs &&
"Arg access out of range!");
1407 getArgs()[Arg] = ArgExpr;
1422 return getSelectorLoc(0);
1426 assert(Index < getNumSelectorLocs() &&
"Index out of range!");
1427 if (hasStandardSelLocs())
1430 llvm::makeArrayRef(const_cast<Expr**>(getArgs()),
1433 return getStoredSelLocs()[Index];
1464 return llvm::make_range(arg_begin(), arg_end());
1467 llvm::iterator_range<const_arg_iterator>
arguments()
const {
1468 return llvm::make_range(arg_begin(), arg_end());
1474 return reinterpret_cast<Stmt **
>(getArgs() + NumArgs);
1478 return reinterpret_cast<Stmt const * const*
>(getArgs());
1482 return reinterpret_cast<Stmt const * const*
>(getArgs() + NumArgs);
1512 Base(base), IsaMemberLoc(l), OpLoc(oploc), IsArrow(isarrow) {}
1532 return getBase()->getBeginLoc();
1536 return getBase()->getEndLoc();
1586 :
Expr(ObjCIndirectCopyRestoreExprClass, Empty) {}
1588 void setShouldCopy(
bool shouldCopy) {
1599 setShouldCopy(shouldCopy);
1624 return getSubExpr()->getExprLoc();
1628 return s->
getStmtClass() == ObjCIndirectCopyRestoreExprClass;
1655 CK, Operand, 0, TSInfo),
1656 LParenLoc(LParenLoc), BridgeKeywordLoc(BridgeKeywordLoc), Kind(Kind) {}
1670 StringRef getBridgeKindName()
const;
1678 return getSubExpr()->getEndLoc();
1702 VersionTuple VersionToCheck;
1710 VersionToCheck(VersionToCheck), AtLoc(AtLoc), RParen(RParen) {}
1713 :
Expr(ObjCAvailabilityCheckExprClass, Shell) {}
1732 return T->
getStmtClass() == ObjCAvailabilityCheckExprClass;
1738 #endif // LLVM_CLANG_AST_EXPROBJC_H ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
For nullary selectors, immediately before the end: "[foo release]" / "-(void)release;" Or with a spac...
const_child_range children() const
const_child_range children() const
The receiver is an object instance.
SourceLocation getBeginLoc() const LLVM_READONLY
SourceLocation getOpLoc() const
ObjCDictionaryElement getKeyValueElement(unsigned Index) const
SourceLocation getBeginLoc() const LLVM_READONLY
Smart pointer class that efficiently represents Objective-C method names.
A (possibly-)qualified type.
static bool classof(const Stmt *T)
void * getAsOpaquePtr() const
const_child_range children() const
SourceLocation getBeginLoc() const LLVM_READONLY
ObjCMethodDecl * getAtIndexMethodDecl() const
const_child_range children() const
SourceLocation EllipsisLoc
The location of the ellipsis, if this element is a pack expansion.
bool isSuperReceiver() const
SourceLocation getEndLoc() const LLVM_READONLY
ObjCBridgeCastKind
The kind of bridging performed by the Objective-C bridge cast.
ObjCProtocolDecl * getProtocol() const
Stmt - This represents one statement.
ObjCMethodDecl * setAtIndexMethodDecl() const
C Language Family Type Representation.
bool isSpecificPlaceholderType(unsigned K) const
Test for a specific placeholder type.
void setAtLoc(SourceLocation L)
SourceLocation getBeginLoc() const LLVM_READONLY
void setRBracket(SourceLocation RB)
ObjCMethodDecl * getImplicitPropertySetter() const
const_arg_iterator arg_end() const
ObjCStringLiteral(EmptyShell Empty)
SourceLocation getExprLoc() const LLVM_READONLY
void setSuper(SourceLocation Loc, QualType T, bool IsInstanceSuper)
The base class of the type hierarchy.
llvm::iterator_range< child_iterator > child_range
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
A container of type source information.
void setInstanceReceiver(Expr *rec)
Turn this message send into an instance message that computes the receiver object with the given expr...
const_child_range children() const
ObjCBoxedExpr(Expr *E, QualType T, ObjCMethodDecl *method, SourceRange R)
void setLocation(SourceLocation L)
void setDelegateInitCall(bool isDelegate)
const_child_range children() const
void setProtocol(ObjCProtocolDecl *P)
SourceLocation getAtLoc() const
ObjCPropertyRefExpr(ObjCPropertyDecl *PD, QualType t, ExprValueKind VK, ExprObjectKind OK, SourceLocation l, Expr *base)
Selector getSetterSelector() const
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
SourceLocation getBeginLoc() const LLVM_READONLY
unsigned NumExpansionsPlusOne
If non-zero, the number of elements that this pack expansion will expand to (+1). ...
SourceLocation getAtLoc() const
void setOpLoc(SourceLocation L)
ObjCInterfaceDecl * getClassReceiver() const
ObjCMethodDecl - Represents an instance or class method declaration.
SourceLocation getLeftLoc() const
ObjCBridgedCastExpr(EmptyShell Shell)
Construct an empty Objective-C bridged cast.
const StringLiteral * getString() const
const_child_range children() const
static bool classof(const Stmt *T)
ObjCPropertyRefExpr(EmptyShell Empty)
ReceiverKind
The kind of receiver this message is sending to.
const_arg_iterator arg_end() const
SourceRange getSourceRange() const LLVM_READONLY
static bool classof(const Stmt *T)
ObjCPropertyDecl * getExplicitProperty() const
void setAtLoc(SourceLocation L)
SourceLocation getAtLoc() const
TypeSourceInfo * getEncodedTypeSourceInfo() const
SourceLocation getBaseLocEnd() const LLVM_READONLY
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 ...
ConstCastIterator< Expr > ConstExprIterator
Internal struct for storing Key/value pair.
ObjCMethodFamily
A family of Objective-C methods.
bool isExplicitProperty() const
ObjCPropertyRefExpr(ObjCMethodDecl *Getter, ObjCMethodDecl *Setter, QualType T, ExprValueKind VK, ExprObjectKind OK, SourceLocation IdLoc, Expr *Base)
SourceLocation getBeginLoc() const LLVM_READONLY
StringLiteral * getString()
ObjCEncodeExpr(EmptyShell Empty)
ObjCIndirectCopyRestoreExprBitfields ObjCIndirectCopyRestoreExprBits
ObjCSubscriptRefExpr(Expr *base, Expr *key, QualType T, ExprValueKind VK, ExprObjectKind OK, ObjCMethodDecl *getMethod, ObjCMethodDecl *setMethod, SourceLocation RB)
bool isClassMessage() const
Determine whether this is an class message to either a specified class or to super.
ObjCBoxedExpr(EmptyShell Empty)
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp, [NSNumber numberWithInt:42]];.
ObjCSelectorExpr(QualType T, Selector selInfo, SourceLocation at, SourceLocation rp)
const_child_range children() const
SourceLocation getEndLoc() const LLVM_READONLY
An r-value expression (a pr-value in the C++11 taxonomy) produces a temporary value.
Selector getSelector() const
bool isUnarySelector() const
SourceLocation getOpLoc() const
const Expr * getElement(unsigned Index) const
Expr * getKeyExpr() const
ObjCBoolLiteralExpr(bool val, QualType Ty, SourceLocation l)
SelectorLocationsKind
Whether all locations of the selector identifiers are in a "standard" position.
bool isMessagingSetter() const
True if the property reference will result in a message to the setter.
Expr * getBaseExpr() const
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
void setSelector(Selector S)
void setLocation(SourceLocation L)
SourceLocation getIsaMemberLoc() const
getMemberLoc - Return the location of the "member", in X->F, it is the location of 'F'...
unsigned getNumSelectorLocs() const
bool isClassReceiver() const
SourceLocation getEndLoc() const LLVM_READONLY
const Expr *const * getElements() const
Retrieve elements of array of literals.
void setString(StringLiteral *S)
ObjCStringLiteral, used for Objective-C string literals i.e.
static bool classof(const Stmt *T)
const Type * getTypePtr() const
Retrieves a pointer to the underlying (unqualified) type.
const_child_range children() const
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.
ObjCMethodDecl * getArrayWithObjectsMethod() 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.
void * getAsOpaquePtr() const
An ordinary object is located at an address in memory.
Represents an ObjC class declaration.
SourceLocation getLocation() const
const Expr *const * getArgs() const
ObjCMethodDecl * getDictWithObjectsMethod() const
ObjCBoolLiteralExpr(EmptyShell Empty)
VersionTuple getVersion()
SourceLocation getEndLoc() const LLVM_READONLY
llvm::iterator_range< const_child_iterator > const_child_range
SourceLocation getBeginLoc() const LLVM_READONLY
static bool classof(const Stmt *T)
SourceLocation getRBracket() const
SourceLocation getEndLoc() const LLVM_READONLY
CastKind
CastKind - The kind of operation required for a conversion.
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation getRParenLoc() const
SourceLocation getEndLoc() const LLVM_READONLY
void setIsMessagingGetter(bool val=true)
ConstStmtIterator const_child_iterator
ObjCAvailabilityCheckExpr(VersionTuple VersionToCheck, SourceLocation AtLoc, SourceLocation RParen, QualType Ty)
ObjCEncodeExpr(QualType T, TypeSourceInfo *EncodedType, SourceLocation at, SourceLocation rp)
const_child_range children() const
ObjCMethodDecl * getBoxingMethod() const
SourceLocation getBeginLoc() const LLVM_READONLY
This represents one expression.
const Expr * getInstanceReceiver() const
ObjCIvarRefExpr(EmptyShell Empty)
ObjCIsaExpr(EmptyShell Empty)
Build an empty expression.
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
SourceLocation getExprLoc() const LLVM_READONLY
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
SourceLocation getEndLoc() const
SourceLocation getStandardSelectorLoc(unsigned Index, Selector Sel, bool WithArgSpace, ArrayRef< Expr *> Args, SourceLocation EndLoc)
Get the "standard" location of a selector identifier, e.g: For nullary selectors, immediately before ...
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getBeginLoc() const LLVM_READONLY
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
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 bool classof(const Stmt *T)
ObjCStringLiteral(StringLiteral *SL, QualType T, SourceLocation L)
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
Expr * getElement(unsigned Index)
getElement - Return the Element at the specified index.
static OMPLinearClause * CreateEmpty(const ASTContext &C, unsigned NumVars)
Creates an empty clause with the place for NumVars variables.
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)
QualType getEncodedType() const
An expression that sends a message to the given Objective-C object or class.
ObjCMethodDecl * getImplicitPropertyGetter() const
SourceLocation getEnd() const
static bool classof(const Stmt *T)
void setAtLoc(SourceLocation L)
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
StmtIterator child_iterator
Child Iterators: All subclasses must implement 'children' to permit easy iteration over the substatem...
unsigned getNumArgs() const
void setRParenLoc(SourceLocation L)
The result type of a method or function.
ObjCBridgeCastKind getBridgeKind() const
Determine which kind of bridge is being performed via this cast.
const_arg_iterator arg_begin() const
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 getEndLoc() const LLVM_READONLY
const_child_range children() const
const_child_range children() const
ObjCPropertyRefExpr(ObjCMethodDecl *Getter, ObjCMethodDecl *Setter, QualType T, ExprValueKind VK, ExprObjectKind OK, SourceLocation IdLoc, SourceLocation ReceiverLoc, ObjCInterfaceDecl *Receiver)
SourceLocation getProtocolIdLoc() const
ObjCSubscriptRefExpr(EmptyShell Empty)
unsigned getNumArgs() const
Return the number of actual arguments in this message, not counting the receiver. ...
ObjCIndirectCopyRestoreExpr(Expr *operand, QualType type, bool shouldCopy)
static bool classof(const Stmt *T)
bool isImplicitProperty() const
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on a template...
bool isExpressibleAsConstantInitializer() const
Encodes a location in the source.
Selector getGetterSelector() const
SourceLocation getEndLoc() const LLVM_READONLY
CastIterator< Expr > ExprIterator
ObjCSelectorExpr(EmptyShell Empty)
SourceLocation getEndLoc() const LLVM_READONLY
void setIsMessagingSetter(bool val=true)
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c dictionary literal.
ObjCMethodFamily getMethodFamily() const
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation getBeginLoc() const LLVM_READONLY
const_child_range children() const
static bool classof(const Stmt *T)
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
void setClassReceiver(TypeSourceInfo *TSInfo)
SourceLocation getRParenLoc() const
SourceLocation getSuperLoc() const
Retrieve the location of the 'super' keyword for a class or instance message to 'super', otherwise an invalid source location.
SourceLocation getAtLoc() const
SourceLocation getEndLoc() const LLVM_READONLY
SourceRange getSourceRange() const
void setIsFreeIvar(bool A)
ObjCProtocolExpr used for protocol expression in Objective-C.
SourceLocation getSelectorLoc(unsigned Index) const
bool isValueDependent() const
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
bool hasVersion() const
This may be '*', in which case this should fold to true.
Represents one property declaration in an Objective-C interface.
const ObjCIvarDecl * getDecl() const
bool isImplicit() const
Indicates whether the message send was implicitly generated by the implementation.
bool isMessagingGetter() const
True if the property reference will result in a message to the getter.
void setBaseExpr(Stmt *S)
void setEncodedTypeSourceInfo(TypeSourceInfo *EncType)
const ObjCMethodDecl * getMethodDecl() const
ObjCBoxedExpr - used for generalized expression boxing.
static QualType getFromOpaquePtr(const void *Ptr)
SourceLocation getBeginLoc() const LLVM_READONLY
llvm::iterator_range< const_arg_iterator > arguments() const
A placeholder type used to construct an empty shell of a type, that will be filled in later (e...
Expr * Value
The value of the dictionary element.
Expr ** getElements()
Retrieve elements of array of literals.
Defines various enumerations that describe declaration and type specifiers.
Expr * getInstanceReceiver()
Returns the object expression (receiver) for an instance message, or null for a message that is not a...
SourceLocation getBeginLoc() const LLVM_READONLY
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers...
Dataflow Directional Tag Classes.
bool isValid() const
Return true if this is a valid SourceLocation object.
SourceLocation getLocation() const
Reads an AST files chain containing the contents of a translation unit.
void setAtLoc(SourceLocation L)
QualType getSuperType() const
Retrieve the type referred to by 'super'.
SourceLocation EllipsisLoc
The location of the ellipsis, if this is a pack expansion.
void setDecl(ObjCIvarDecl *d)
SourceLocation getEndLoc() const LLVM_READONLY
A runtime availability query.
static bool classof(const Stmt *T)
StmtClass getStmtClass() const
const_child_range children() const
static bool classof(const Stmt *T)
ExplicitCastExpr - An explicit cast written in the source code.
void setSelector(Selector S)
void setMethodDecl(ObjCMethodDecl *MD)
SourceLocation getLParenLoc() const
SourceLocation getRParenLoc() const
SourceLocation getBeginLoc() const LLVM_READONLY
QualType getClassReceiver() const
Returns the type of a class message send, or NULL if the message is not a class message.
const_arg_iterator arg_begin() const
SourceLocation getEndLoc() const LLVM_READONLY
static bool classof(const Stmt *T)
SourceLocation getAtLoc() const
SourceLocation getBeginLoc() const
Iterator for iterating over Stmt * arrays that contain only T *.
ObjCPropertyRefExpr(ObjCMethodDecl *Getter, ObjCMethodDecl *Setter, QualType T, ExprValueKind VK, ExprObjectKind OK, SourceLocation IdLoc, SourceLocation SuperLoc, QualType SuperTy)
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c array literal.
ObjCEncodeExpr, used for @encode in Objective-C.
static bool classof(const Stmt *s)
SourceLocation getLocation() const
ObjCAvailabilityCheckExpr(EmptyShell Shell)
ObjCBridgedCastExpr(SourceLocation LParenLoc, ObjCBridgeCastKind Kind, CastKind CK, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *Operand)
bool isDelegateInitCall() const
isDelegateInitCall - Answers whether this message send has been tagged as a "delegate init call"...
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
const Expr * getBase() const
ObjCProtocolExpr(EmptyShell Empty)
void setRParenLoc(SourceLocation L)
A bitfield object is a bitfield on a C or C++ record.
ObjCIvarRefExpr - A reference to an ObjC instance variable.
SourceLocation getEndLoc() const LLVM_READONLY
QualType getSuperReceiverType() const
Defines the clang::SourceLocation class and associated facilities.
llvm::iterator_range< arg_iterator > arguments()
void setSourceRange(SourceRange R)
SourceLocation getSelectorStartLoc() const
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getBeginLoc() const LLVM_READONLY
bool isPackExpansion() const
Determines whether this dictionary element is a pack expansion.
ObjCIvarDecl - Represents an ObjC instance variable.
void setIsaMemberLoc(SourceLocation L)
bool containsUnexpandedParameterPack() const
Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates)...
bool shouldCopy() const
shouldCopy - True if we should do the 'copy' part of the copy-restore.
StringLiteral - This represents a string literal expression, e.g.
void setOpLoc(SourceLocation L)
const Expr * getArg(unsigned Arg) const
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 isObjectReceiver() const
SourceLocation getReceiverLocation() const
SourceLocation getBridgeKeywordLoc() const
The location of the bridge keyword.
ObjCProtocolExpr(QualType T, ObjCProtocolDecl *protocol, SourceLocation at, SourceLocation protoLoc, SourceLocation rp)
const Expr * getSubExpr() const
bool isArraySubscriptRefExpr() const
static bool classof(const Stmt *T)
An l-value expression is a reference to an object with independent storage.
const Expr * getBase() const
A trivial tuple used to represent a source range.
ObjCMethodDecl * getMethodDecl()
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getRightLoc() const
The receiver is a superclass.
bool isInstanceMessage() const
Determine whether this is an instance message to either a computed object or to super.
SourceLocation getBegin() const
static bool classof(const Stmt *T)
void setArg(unsigned Arg, Expr *ArgExpr)
setArg - Set the specified argument.
SourceLocation getBeginLoc() const LLVM_READONLY
SourceLocation getBeginLoc() const LLVM_READONLY
const Expr * getSubExpr() const
QualType getType() const
Return the type wrapped by this type source info.
static OMPLinearClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, OpenMPLinearClauseKind Modifier, SourceLocation ModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc, ArrayRef< Expr *> VL, ArrayRef< Expr *> PL, ArrayRef< Expr *> IL, Expr *Step, Expr *CalcStep, Stmt *PreInit, Expr *PostUpdate)
Creates clause with a list of variables VL and a linear step Step.
TypeSourceInfo * getClassReceiverTypeInfo() const
Returns a type-source information of a class message send, or nullptr if the message is not a class m...