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) {}
94 :
Expr(ObjCBoolLiteralExprClass, Empty) {}
135 SubExpr(E), BoxingMethod(method), Range(R) {}
137 :
Expr(ObjCBoxedExprClass, Empty) {}
163 return reinterpret_cast<Stmt const * const*
>(&SubExpr);
167 return reinterpret_cast<Stmt const * const*
>(&SubExpr + 1);
180 unsigned NumElements;
189 :
Expr(ObjCArrayLiteralClass, Empty), NumElements(NumElements) {}
201 unsigned NumElements);
214 return getTrailingObjects<Expr *>();
222 assert((Index < NumElements) &&
"Arg access out of range!");
223 return getElements()[Index];
226 assert((Index < NumElements) &&
"Arg access out of range!");
227 return getElements()[Index];
231 return ArrayWithObjectsMethod;
236 return child_range(reinterpret_cast<Stmt **>(getElements()),
237 reinterpret_cast<Stmt **>(getElements()) + NumElements);
299 ObjCDictionaryLiteral_KeyValuePair,
300 ObjCDictionaryLiteral_ExpansionData> {
302 unsigned NumElements : 31;
311 unsigned HasPackExpansions : 1;
320 bool HasPackExpansions,
325 bool HasPackExpansions)
326 :
Expr(ObjCDictionaryLiteralClass, Empty), NumElements(NumElements),
327 HasPackExpansions(HasPackExpansions) {}
329 size_t numTrailingObjects(OverloadToken<KeyValuePair>)
const {
340 bool HasPackExpansions,
345 unsigned NumElements,
346 bool HasPackExpansions);
353 assert((Index < NumElements) &&
"Arg access out of range!");
354 const KeyValuePair &KV = getTrailingObjects<KeyValuePair>()[Index];
356 if (HasPackExpansions) {
358 getTrailingObjects<ExpansionData>()[Index];
367 return DictWithObjectsMethod;
381 "KeyValuePair is expected size");
383 reinterpret_cast<Stmt **>(getTrailingObjects<KeyValuePair>()),
384 reinterpret_cast<Stmt **>(getTrailingObjects<KeyValuePair>()) +
404 EncodedType->
getType()->isDependentType(),
405 EncodedType->
getType()->isDependentType(),
406 EncodedType->
getType()->isInstantiationDependentType(),
408 EncodedType(EncodedType), AtLoc(at), RParenLoc(rp) {}
422 EncodedType = EncType;
450 SelName(selInfo), AtLoc(at), RParenLoc(rp) {}
452 :
Expr(ObjCSelectorExprClass, Empty) {}
500 TheProtocol(protocol), AtLoc(at), ProtoLoc(protoLoc), RParenLoc(rp) {}
502 :
Expr(ObjCProtocolExprClass, Empty) {}
547 bool arrow =
false,
bool freeIvar =
false)
553 D(d), Base(base), Loc(l), OpLoc(oploc), IsArrow(arrow),
554 IsFreeIvar(freeIvar) {}
557 :
Expr(ObjCIvarRefExprClass, Empty) {}
577 return isFreeIvar() ? Loc : getBase()->getLocStart();
601 llvm::PointerIntPair<NamedDecl *, 1, bool> PropertyOrGetter;
606 enum MethodRefFlags {
608 MethodRef_Getter = 0x1,
609 MethodRef_Setter = 0x2
613 llvm::PointerIntPair<ObjCMethodDecl *, 2, unsigned> SetterAndMethodRefFlags;
626 llvm::PointerUnion3<Stmt *, const Type *, ObjCInterfaceDecl *> Receiver;
632 :
Expr(ObjCPropertyRefExprClass, t, VK, OK,
636 PropertyOrGetter(PD,
false), IdLoc(l), Receiver(base) {
643 :
Expr(ObjCPropertyRefExprClass, t, VK, OK,
644 false,
false, st->isInstantiationDependentType(),
646 PropertyOrGetter(PD,
false), IdLoc(l), ReceiverLoc(sl),
647 Receiver(st.getTypePtr()) {
654 :
Expr(ObjCPropertyRefExprClass, T, VK, OK,
false,
657 PropertyOrGetter(Getter,
true), SetterAndMethodRefFlags(Setter, 0),
658 IdLoc(IdLoc), Receiver(Base) {
667 PropertyOrGetter(Getter,
true), SetterAndMethodRefFlags(Setter, 0),
668 IdLoc(IdLoc), ReceiverLoc(SuperLoc), Receiver(SuperTy.getTypePtr()) {
677 PropertyOrGetter(Getter,
true), SetterAndMethodRefFlags(Setter, 0),
678 IdLoc(IdLoc), ReceiverLoc(ReceiverLoc), Receiver(Receiver) {
683 :
Expr(ObjCPropertyRefExprClass, Empty) {}
689 assert(!isImplicitProperty());
690 return cast<ObjCPropertyDecl>(PropertyOrGetter.getPointer());
694 assert(isImplicitProperty());
695 return cast_or_null<ObjCMethodDecl>(PropertyOrGetter.getPointer());
699 assert(isImplicitProperty());
700 return SetterAndMethodRefFlags.getPointer();
704 if (isImplicitProperty())
705 return getImplicitPropertyGetter()->getSelector();
706 return getExplicitProperty()->getGetterName();
710 if (isImplicitProperty())
711 return getImplicitPropertySetter()->getSelector();
712 return getExplicitProperty()->getSetterName();
719 return SetterAndMethodRefFlags.getInt() & MethodRef_Getter;
726 return SetterAndMethodRefFlags.getInt() & MethodRef_Setter;
730 setMethodRefFlag(MethodRef_Getter, val);
734 setMethodRefFlag(MethodRef_Setter, val);
738 return cast<Expr>(Receiver.get<
Stmt*>());
741 return cast<Expr>(Receiver.get<
Stmt*>());
765 return isObjectReceiver() ? getBase()->getLocStart() :getReceiverLocation();
773 if (Receiver.is<
Stmt*>()) {
774 Stmt **begin =
reinterpret_cast<Stmt**
>(&Receiver);
789 PropertyOrGetter.setPointer(D);
790 PropertyOrGetter.setInt(
false);
791 SetterAndMethodRefFlags.setPointer(
nullptr);
792 SetterAndMethodRefFlags.setInt(methRefFlags);
796 unsigned methRefFlags) {
797 PropertyOrGetter.setPointer(Getter);
798 PropertyOrGetter.setInt(
true);
799 SetterAndMethodRefFlags.setPointer(Setter);
800 SetterAndMethodRefFlags.setInt(methRefFlags);
803 void setBase(
Expr *
Base) { Receiver = Base; }
808 void setReceiverLocation(
SourceLocation Loc) { ReceiverLoc = Loc; }
810 void setMethodRefFlag(MethodRefFlags flag,
bool val) {
811 unsigned f = SetterAndMethodRefFlags.getInt();
816 SetterAndMethodRefFlags.setInt(f);
829 enum { BASE, KEY, END_EXPR };
830 Stmt* SubExprs[END_EXPR];
843 :
Expr(ObjCSubscriptRefExprClass, T, VK, OK,
850 RBracket(RB), GetAtIndexMethodDecl(getMethod),
851 SetAtIndexMethodDecl(setMethod) {
852 SubExprs[BASE] = base; SubExprs[KEY] = key;
856 :
Expr(ObjCSubscriptRefExprClass, Empty) {}
876 return GetAtIndexMethodDecl;
880 return SetAtIndexMethodDecl;
884 return getKeyExpr()->getType()->isIntegralOrEnumerationType();
933 enum { NumArgsBitWidth = 16 };
937 unsigned NumArgs : NumArgsBitWidth;
950 unsigned HasMethod : 1;
954 unsigned IsDelegateInitCall : 1;
958 unsigned IsImplicit : 1;
962 unsigned SelLocsKind : 2;
973 :
Expr(ObjCMessageExprClass, Empty),
Kind(0), HasMethod(
false),
974 IsDelegateInitCall(
false), IsImplicit(
false), SelLocsKind(0) {
981 bool IsInstanceSuper,
1011 size_t numTrailingObjects(OverloadToken<void *>)
const {
return NumArgs + 1; }
1013 void setNumArgs(
unsigned Num) {
1014 assert((Num >> NumArgsBitWidth) == 0 &&
"Num of args is out of range!");
1023 void *getReceiverPointer()
const {
return *getTrailingObjects<void *>(); }
1026 void setReceiverPointer(
void *
Value) {
1027 *getTrailingObjects<void *>() = Value;
1034 bool hasStandardSelLocs()
const {
1041 return getTrailingObjects<SourceLocation>();
1044 return getTrailingObjects<SourceLocation>();
1049 unsigned getNumStoredSelLocs()
const {
1050 if (hasStandardSelLocs())
1052 return getNumSelectorLocs();
1063 unsigned NumStoredSelLocs);
1114 bool IsInstanceSuper,
1200 unsigned NumStoredSelLocs);
1217 return getReceiverKind() == Instance || getReceiverKind() == SuperInstance;
1223 return getReceiverKind() == Class || getReceiverKind() == SuperClass;
1229 if (getReceiverKind() == Instance)
1230 return static_cast<Expr *
>(getReceiverPointer());
1242 setReceiverPointer(rec);
1249 return TSInfo->getType();
1257 if (getReceiverKind() == Class)
1264 setReceiverPointer(TSInfo);
1270 if (getReceiverKind() == SuperInstance || getReceiverKind() == SuperClass)
1305 if (getReceiverKind() == SuperInstance || getReceiverKind() == SuperClass)
1312 Kind = IsInstanceSuper? SuperInstance : SuperClass;
1326 return reinterpret_cast<const ObjCMethodDecl *
>(SelectorOrMethod);
1340 SelectorOrMethod =
reinterpret_cast<uintptr_t>(MD);
1344 if (HasMethod)
return getMethodDecl()->getMethodFamily();
1345 return getSelector().getMethodFamily();
1355 return reinterpret_cast<Expr **
>(getTrailingObjects<void *>() + 1);
1358 return reinterpret_cast<const Expr *
const *
>(getTrailingObjects<void *>() +
1364 assert(Arg < NumArgs &&
"Arg access out of range!");
1365 return getArgs()[Arg];
1368 assert(Arg < NumArgs &&
"Arg access out of range!");
1369 return getArgs()[Arg];
1374 assert(Arg < NumArgs &&
"Arg access out of range!");
1375 getArgs()[Arg] = ArgExpr;
1390 return getSelectorLoc(0);
1394 assert(Index < getNumSelectorLocs() &&
"Index out of range!");
1395 if (hasStandardSelLocs())
1398 llvm::makeArrayRef(const_cast<Expr**>(getArgs()),
1401 return getStoredSelLocs()[Index];
1432 return llvm::make_range(arg_begin(), arg_end());
1435 llvm::iterator_range<const_arg_iterator>
arguments()
const {
1436 return llvm::make_range(arg_begin(), arg_end());
1442 return reinterpret_cast<Stmt **
>(getArgs() + NumArgs);
1446 return reinterpret_cast<Stmt const * const*
>(getArgs());
1450 return reinterpret_cast<Stmt const * const*
>(getArgs() + NumArgs);
1480 Base(base), IsaMemberLoc(l), OpLoc(oploc), IsArrow(isarrow) {}
1501 return getBase()->getLocStart();
1505 return getBase()->getLocEnd();
1552 :
Expr(ObjCIndirectCopyRestoreExprClass, Empty) {}
1554 void setShouldCopy(
bool shouldCopy) {
1565 setShouldCopy(shouldCopy);
1588 return getSubExpr()->getExprLoc();
1592 return s->
getStmtClass() == ObjCIndirectCopyRestoreExprClass;
1605 ObjCBridgedCastExpr, CastExpr::BasePathSizeTy, CXXBaseSpecifier *> {
1615 size_t numTrailingObjects(OverloadToken<CastExpr::BasePathSizeTy>)
const {
1616 return path_empty() ? 0 : 1;
1624 CK, Operand, 0, TSInfo),
1625 LParenLoc(LParenLoc), BridgeKeywordLoc(BridgeKeywordLoc), Kind(Kind) {}
1639 StringRef getBridgeKindName()
const;
1649 return getSubExpr()->getLocEnd();
1673 VersionTuple VersionToCheck;
1681 VersionToCheck(VersionToCheck), AtLoc(AtLoc), RParen(RParen) {}
1684 :
Expr(ObjCAvailabilityCheckExprClass, Shell) {}
1701 return T->
getStmtClass() == ObjCAvailabilityCheckExprClass;
1707 #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.
SourceLocation getLocStart() const LLVM_READONLY
A (possibly-)qualified type.
static bool classof(const Stmt *T)
void * getAsOpaquePtr() const
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getBeginLoc() const LLVM_READONLY
ObjCMethodDecl * getAtIndexMethodDecl() const
SourceLocation getLocEnd() const LLVM_READONLY
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.
SourceLocation getLocStart() const LLVM_READONLY
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)
SourceLocation getLocEnd() const LLVM_READONLY
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.
SourceLocation getLocStart() const LLVM_READONLY
llvm::iterator_range< child_iterator > child_range
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
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...
SourceLocation getLocEnd() const LLVM_READONLY
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
SourceLocation getLocEnd() const LLVM_READONLY
static bool classof(const Stmt *T)
SourceLocation getLocEnd() const LLVM_READONLY
ObjCPropertyDecl * getExplicitProperty() const
void setAtLoc(SourceLocation L)
SourceLocation getAtLoc() const
TypeSourceInfo * getEncodedTypeSourceInfo() const
SourceLocation getBaseLocEnd() const LLVM_READONLY
SourceLocation getLocStart() 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)
StringLiteral * getString()
ObjCEncodeExpr(EmptyShell Empty)
SourceLocation getLocEnd() const LLVM_READONLY
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)
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)
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
SourceLocation getLocStart() const LLVM_READONLY
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.
SourceLocation getLocEnd() const LLVM_READONLY
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
SourceLocation getLocStart() const LLVM_READONLY
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.
SourceLocation getLocStart() const LLVM_READONLY
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 getLocEnd() const LLVM_READONLY
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
Expr - 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 getLocStart() const LLVM_READONLY
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
SourceLocation getLocStart() 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 getLocEnd() 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
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getLocStart() 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
SourceLocation getLocStart() 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]).
SourceLocation getLocStart() const LLVM_READONLY
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.
SourceLocation getLocEnd() const LLVM_READONLY
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
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getLocStart() const LLVM_READONLY
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
SourceLocation getLocEnd() const LLVM_READONLY
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.
SourceLocation getLocEnd() const LLVM_READONLY
void setIsaMemberLoc(SourceLocation L)
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getLocStart() const LLVM_READONLY
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 getLocEnd() 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
SourceLocation getLocStart() 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...