14 #ifndef LLVM_CLANG_AST_EXPROBJC_H 15 #define LLVM_CLANG_AST_EXPROBJC_H 28 #include "llvm/ADT/ArrayRef.h" 29 #include "llvm/ADT/None.h" 30 #include "llvm/ADT/Optional.h" 31 #include "llvm/ADT/PointerIntPair.h" 32 #include "llvm/ADT/PointerUnion.h" 33 #include "llvm/ADT/StringRef.h" 34 #include "llvm/ADT/iterator_range.h" 35 #include "llvm/Support/Casting.h" 36 #include "llvm/Support/Compiler.h" 37 #include "llvm/Support/TrailingObjects.h" 38 #include "llvm/Support/VersionTuple.h" 39 #include "llvm/Support/type_traits.h" 47 class CXXBaseSpecifier;
59 String(SL), AtLoc(L) {}
61 :
Expr(ObjCStringLiteralClass, Empty) {}
92 :
Expr(ObjCBoolLiteralExprClass, Empty) {}
131 SubExpr(E), BoxingMethod(method), Range(R) {}
133 :
Expr(ObjCBoxedExprClass, Empty) {}
157 return reinterpret_cast<Stmt const * const*
>(&SubExpr);
161 return reinterpret_cast<Stmt const * const*
>(&SubExpr + 1);
174 unsigned NumElements;
183 :
Expr(ObjCArrayLiteralClass, Empty), NumElements(NumElements) {}
195 unsigned NumElements);
206 return getTrailingObjects<Expr *>();
214 assert((Index < NumElements) &&
"Arg access out of range!");
215 return getElements()[Index];
218 assert((Index < NumElements) &&
"Arg access out of range!");
219 return getElements()[Index];
223 return ArrayWithObjectsMethod;
228 return child_range(reinterpret_cast<Stmt **>(getElements()),
229 reinterpret_cast<Stmt **>(getElements()) + NumElements);
291 ObjCDictionaryLiteral_KeyValuePair,
292 ObjCDictionaryLiteral_ExpansionData> {
294 unsigned NumElements : 31;
303 unsigned HasPackExpansions : 1;
312 bool HasPackExpansions,
317 bool HasPackExpansions)
318 :
Expr(ObjCDictionaryLiteralClass, Empty), NumElements(NumElements),
319 HasPackExpansions(HasPackExpansions) {}
321 size_t numTrailingObjects(OverloadToken<KeyValuePair>)
const {
332 bool HasPackExpansions,
337 unsigned NumElements,
338 bool HasPackExpansions);
345 assert((Index < NumElements) &&
"Arg access out of range!");
346 const KeyValuePair &KV = getTrailingObjects<KeyValuePair>()[Index];
348 if (HasPackExpansions) {
350 getTrailingObjects<ExpansionData>()[Index];
359 return DictWithObjectsMethod;
371 "KeyValuePair is expected size");
373 reinterpret_cast<Stmt **>(getTrailingObjects<KeyValuePair>()),
374 reinterpret_cast<Stmt **>(getTrailingObjects<KeyValuePair>()) +
394 EncodedType->
getType()->isDependentType(),
395 EncodedType->
getType()->isDependentType(),
396 EncodedType->
getType()->isInstantiationDependentType(),
398 EncodedType(EncodedType), AtLoc(at), RParenLoc(rp) {}
412 EncodedType = EncType;
438 SelName(selInfo), AtLoc(at), RParenLoc(rp) {}
440 :
Expr(ObjCSelectorExprClass, Empty) {}
486 TheProtocol(protocol), AtLoc(at), ProtoLoc(protoLoc), RParenLoc(rp) {}
488 :
Expr(ObjCProtocolExprClass, Empty) {}
531 bool arrow =
false,
bool freeIvar =
false)
537 D(d), Base(base), Loc(l), OpLoc(oploc), IsArrow(arrow),
538 IsFreeIvar(freeIvar) {}
541 :
Expr(ObjCIvarRefExprClass, Empty) {}
560 return isFreeIvar() ? Loc : getBase()->getBeginLoc();
583 llvm::PointerIntPair<NamedDecl *, 1, bool> PropertyOrGetter;
588 enum MethodRefFlags {
590 MethodRef_Getter = 0x1,
591 MethodRef_Setter = 0x2
595 llvm::PointerIntPair<ObjCMethodDecl *, 2, unsigned> SetterAndMethodRefFlags;
608 llvm::PointerUnion3<Stmt *, const Type *, ObjCInterfaceDecl *> Receiver;
614 :
Expr(ObjCPropertyRefExprClass, t, VK, OK,
618 PropertyOrGetter(PD,
false), IdLoc(l), Receiver(base) {
625 :
Expr(ObjCPropertyRefExprClass, t, VK, OK,
626 false,
false, st->isInstantiationDependentType(),
628 PropertyOrGetter(PD,
false), IdLoc(l), ReceiverLoc(sl),
629 Receiver(st.getTypePtr()) {
636 :
Expr(ObjCPropertyRefExprClass, T, VK, OK,
false,
639 PropertyOrGetter(Getter,
true), SetterAndMethodRefFlags(Setter, 0),
640 IdLoc(IdLoc), Receiver(Base) {
649 PropertyOrGetter(Getter,
true), SetterAndMethodRefFlags(Setter, 0),
650 IdLoc(IdLoc), ReceiverLoc(SuperLoc), Receiver(SuperTy.getTypePtr()) {
659 PropertyOrGetter(Getter,
true), SetterAndMethodRefFlags(Setter, 0),
660 IdLoc(IdLoc), ReceiverLoc(ReceiverLoc), Receiver(Receiver) {
665 :
Expr(ObjCPropertyRefExprClass, Empty) {}
671 assert(!isImplicitProperty());
672 return cast<ObjCPropertyDecl>(PropertyOrGetter.getPointer());
676 assert(isImplicitProperty());
677 return cast_or_null<ObjCMethodDecl>(PropertyOrGetter.getPointer());
681 assert(isImplicitProperty());
682 return SetterAndMethodRefFlags.getPointer();
686 if (isImplicitProperty())
687 return getImplicitPropertyGetter()->getSelector();
688 return getExplicitProperty()->getGetterName();
692 if (isImplicitProperty())
693 return getImplicitPropertySetter()->getSelector();
694 return getExplicitProperty()->getSetterName();
701 return SetterAndMethodRefFlags.getInt() & MethodRef_Getter;
708 return SetterAndMethodRefFlags.getInt() & MethodRef_Setter;
712 setMethodRefFlag(MethodRef_Getter, val);
716 setMethodRefFlag(MethodRef_Setter, val);
720 return cast<Expr>(Receiver.get<
Stmt*>());
723 return cast<Expr>(Receiver.get<
Stmt*>());
746 return isObjectReceiver() ? getBase()->getBeginLoc()
747 : getReceiverLocation();
754 if (Receiver.is<
Stmt*>()) {
755 Stmt **begin =
reinterpret_cast<Stmt**
>(&Receiver);
770 PropertyOrGetter.setPointer(D);
771 PropertyOrGetter.setInt(
false);
772 SetterAndMethodRefFlags.setPointer(
nullptr);
773 SetterAndMethodRefFlags.setInt(methRefFlags);
777 unsigned methRefFlags) {
778 PropertyOrGetter.setPointer(Getter);
779 PropertyOrGetter.setInt(
true);
780 SetterAndMethodRefFlags.setPointer(Setter);
781 SetterAndMethodRefFlags.setInt(methRefFlags);
784 void setBase(
Expr *
Base) { Receiver = Base; }
789 void setReceiverLocation(
SourceLocation Loc) { ReceiverLoc = Loc; }
791 void setMethodRefFlag(MethodRefFlags flag,
bool val) {
792 unsigned f = SetterAndMethodRefFlags.getInt();
797 SetterAndMethodRefFlags.setInt(f);
810 enum { BASE, KEY, END_EXPR };
811 Stmt* SubExprs[END_EXPR];
824 :
Expr(ObjCSubscriptRefExprClass, T, VK, OK,
831 RBracket(RB), GetAtIndexMethodDecl(getMethod),
832 SetAtIndexMethodDecl(setMethod) {
833 SubExprs[BASE] = base; SubExprs[KEY] = key;
837 :
Expr(ObjCSubscriptRefExprClass, Empty) {}
855 return GetAtIndexMethodDecl;
859 return SetAtIndexMethodDecl;
863 return getKeyExpr()->getType()->isIntegralOrEnumerationType();
912 enum { NumArgsBitWidth = 16 };
916 unsigned NumArgs : NumArgsBitWidth;
929 unsigned HasMethod : 1;
933 unsigned IsDelegateInitCall : 1;
937 unsigned IsImplicit : 1;
941 unsigned SelLocsKind : 2;
952 :
Expr(ObjCMessageExprClass, Empty),
Kind(0), HasMethod(
false),
953 IsDelegateInitCall(
false), IsImplicit(
false), SelLocsKind(0) {
960 bool IsInstanceSuper,
990 size_t numTrailingObjects(OverloadToken<void *>)
const {
return NumArgs + 1; }
992 void setNumArgs(
unsigned Num) {
993 assert((Num >> NumArgsBitWidth) == 0 &&
"Num of args is out of range!");
1002 void *getReceiverPointer()
const {
return *getTrailingObjects<void *>(); }
1005 void setReceiverPointer(
void *
Value) {
1006 *getTrailingObjects<void *>() = Value;
1013 bool hasStandardSelLocs()
const {
1020 return getTrailingObjects<SourceLocation>();
1023 return getTrailingObjects<SourceLocation>();
1028 unsigned getNumStoredSelLocs()
const {
1029 if (hasStandardSelLocs())
1031 return getNumSelectorLocs();
1042 unsigned NumStoredSelLocs);
1093 bool IsInstanceSuper,
1179 unsigned NumStoredSelLocs);
1196 return getReceiverKind() == Instance || getReceiverKind() == SuperInstance;
1202 return getReceiverKind() == Class || getReceiverKind() == SuperClass;
1208 if (getReceiverKind() == Instance)
1209 return static_cast<Expr *
>(getReceiverPointer());
1221 setReceiverPointer(rec);
1228 return TSInfo->getType();
1236 if (getReceiverKind() == Class)
1243 setReceiverPointer(TSInfo);
1249 if (getReceiverKind() == SuperInstance || getReceiverKind() == SuperClass)
1284 if (getReceiverKind() == SuperInstance || getReceiverKind() == SuperClass)
1291 Kind = IsInstanceSuper? SuperInstance : SuperClass;
1305 return reinterpret_cast<const ObjCMethodDecl *
>(SelectorOrMethod);
1319 SelectorOrMethod =
reinterpret_cast<uintptr_t>(MD);
1323 if (HasMethod)
return getMethodDecl()->getMethodFamily();
1324 return getSelector().getMethodFamily();
1334 return reinterpret_cast<Expr **
>(getTrailingObjects<void *>() + 1);
1337 return reinterpret_cast<const Expr *
const *
>(getTrailingObjects<void *>() +
1343 assert(Arg < NumArgs &&
"Arg access out of range!");
1344 return getArgs()[Arg];
1347 assert(Arg < NumArgs &&
"Arg access out of range!");
1348 return getArgs()[Arg];
1353 assert(Arg < NumArgs &&
"Arg access out of range!");
1354 getArgs()[Arg] = ArgExpr;
1369 return getSelectorLoc(0);
1373 assert(Index < getNumSelectorLocs() &&
"Index out of range!");
1374 if (hasStandardSelLocs())
1377 llvm::makeArrayRef(const_cast<Expr**>(getArgs()),
1380 return getStoredSelLocs()[Index];
1409 return llvm::make_range(arg_begin(), arg_end());
1412 llvm::iterator_range<const_arg_iterator>
arguments()
const {
1413 return llvm::make_range(arg_begin(), arg_end());
1419 return reinterpret_cast<Stmt **
>(getArgs() + NumArgs);
1423 return reinterpret_cast<Stmt const * const*
>(getArgs());
1427 return reinterpret_cast<Stmt const * const*
>(getArgs() + NumArgs);
1457 Base(base), IsaMemberLoc(l), OpLoc(oploc), IsArrow(isarrow) {}
1477 return getBase()->getBeginLoc();
1481 return getBase()->getEndLoc();
1527 :
Expr(ObjCIndirectCopyRestoreExprClass, Empty) {}
1529 void setShouldCopy(
bool shouldCopy) {
1540 setShouldCopy(shouldCopy);
1561 return getSubExpr()->getExprLoc();
1565 return s->
getStmtClass() == ObjCIndirectCopyRestoreExprClass;
1592 CK, Operand, 0, TSInfo),
1593 LParenLoc(LParenLoc), BridgeKeywordLoc(BridgeKeywordLoc), Kind(Kind) {}
1607 StringRef getBridgeKindName()
const;
1615 return getSubExpr()->getEndLoc();
1639 VersionTuple VersionToCheck;
1647 VersionToCheck(VersionToCheck), AtLoc(AtLoc), RParen(RParen) {}
1650 :
Expr(ObjCAvailabilityCheckExprClass, Shell) {}
1665 return T->
getStmtClass() == ObjCAvailabilityCheckExprClass;
1671 #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...
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
SourceLocation getBeginLoc() const LLVM_READONLY
ObjCMethodDecl * getAtIndexMethodDecl() const
Expr(StmtClass SC, QualType T, ExprValueKind VK, ExprObjectKind OK, bool TD, bool VD, bool ID, bool ContainsUnexpandedParameterPack)
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.
DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterat...
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...
ObjCBoxedExpr(Expr *E, QualType T, ObjCMethodDecl *method, SourceRange R)
void setLocation(SourceLocation L)
void setDelegateInitCall(bool isDelegate)
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
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 ...
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)
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.
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
Iterator for iterating over Stmt * arrays that contain only Expr *.
const Expr *const * getArgs() const
ObjCMethodDecl * getDictWithObjectsMethod() const
ObjCBoolLiteralExpr(EmptyShell Empty)
VersionTuple getVersion()
SourceLocation getEndLoc() const LLVM_READONLY
Const iterator for iterating over Stmt * arrays that contain only Expr *.
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)
ObjCAvailabilityCheckExpr(VersionTuple VersionToCheck, SourceLocation AtLoc, SourceLocation RParen, QualType Ty)
ObjCEncodeExpr(QualType T, TypeSourceInfo *EncodedType, SourceLocation at, SourceLocation rp)
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
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
__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 getEndLoc() const LLVM_READONLY
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...
Encodes a location in the source.
Selector getGetterSelector() const
SourceLocation getEndLoc() const LLVM_READONLY
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
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
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
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...