14 #ifndef LLVM_CLANG_AST_EXPROBJC_H 15 #define LLVM_CLANG_AST_EXPROBJC_H 29 #include "llvm/ADT/ArrayRef.h" 30 #include "llvm/ADT/None.h" 31 #include "llvm/ADT/Optional.h" 32 #include "llvm/ADT/PointerIntPair.h" 33 #include "llvm/ADT/PointerUnion.h" 34 #include "llvm/ADT/StringRef.h" 35 #include "llvm/ADT/iterator_range.h" 36 #include "llvm/Support/Casting.h" 37 #include "llvm/Support/Compiler.h" 38 #include "llvm/Support/TrailingObjects.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 cast<Expr>(getElements()[Index]);
218 assert((Index < NumElements) &&
"Arg access out of range!");
219 return cast<Expr>(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()->getLocStart();
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()->getLocStart() :getReceiverLocation();
753 if (Receiver.is<
Stmt*>()) {
754 Stmt **begin =
reinterpret_cast<Stmt**
>(&Receiver);
769 PropertyOrGetter.setPointer(D);
770 PropertyOrGetter.setInt(
false);
771 SetterAndMethodRefFlags.setPointer(
nullptr);
772 SetterAndMethodRefFlags.setInt(methRefFlags);
776 unsigned methRefFlags) {
777 PropertyOrGetter.setPointer(Getter);
778 PropertyOrGetter.setInt(
true);
779 SetterAndMethodRefFlags.setPointer(Setter);
780 SetterAndMethodRefFlags.setInt(methRefFlags);
783 void setBase(
Expr *
Base) { Receiver = Base; }
788 void setReceiverLocation(
SourceLocation Loc) { ReceiverLoc = Loc; }
790 void setMethodRefFlag(MethodRefFlags flag,
bool val) {
791 unsigned f = SetterAndMethodRefFlags.getInt();
796 SetterAndMethodRefFlags.setInt(f);
809 enum { BASE, KEY, END_EXPR };
810 Stmt* SubExprs[END_EXPR];
823 :
Expr(ObjCSubscriptRefExprClass, T, VK, OK,
830 RBracket(RB), GetAtIndexMethodDecl(getMethod),
831 SetAtIndexMethodDecl(setMethod) {
832 SubExprs[BASE] = base; SubExprs[KEY] = key;
836 :
Expr(ObjCSubscriptRefExprClass, Empty) {}
854 return GetAtIndexMethodDecl;
858 return SetAtIndexMethodDecl;
862 return getKeyExpr()->getType()->isIntegralOrEnumerationType();
911 enum { NumArgsBitWidth = 16 };
915 unsigned NumArgs : NumArgsBitWidth;
928 unsigned HasMethod : 1;
932 unsigned IsDelegateInitCall : 1;
936 unsigned IsImplicit : 1;
940 unsigned SelLocsKind : 2;
951 :
Expr(ObjCMessageExprClass, Empty),
Kind(0), HasMethod(
false),
952 IsDelegateInitCall(
false), IsImplicit(
false), SelLocsKind(0) {
959 bool IsInstanceSuper,
989 size_t numTrailingObjects(OverloadToken<void *>)
const {
return NumArgs + 1; }
991 void setNumArgs(
unsigned Num) {
992 assert((Num >> NumArgsBitWidth) == 0 &&
"Num of args is out of range!");
1001 void *getReceiverPointer()
const {
return *getTrailingObjects<void *>(); }
1004 void setReceiverPointer(
void *
Value) {
1005 *getTrailingObjects<void *>() = Value;
1012 bool hasStandardSelLocs()
const {
1019 return getTrailingObjects<SourceLocation>();
1022 return getTrailingObjects<SourceLocation>();
1027 unsigned getNumStoredSelLocs()
const {
1028 if (hasStandardSelLocs())
1030 return getNumSelectorLocs();
1041 unsigned NumStoredSelLocs);
1092 bool IsInstanceSuper,
1178 unsigned NumStoredSelLocs);
1195 return getReceiverKind() == Instance || getReceiverKind() == SuperInstance;
1201 return getReceiverKind() == Class || getReceiverKind() == SuperClass;
1207 if (getReceiverKind() == Instance)
1208 return static_cast<Expr *
>(getReceiverPointer());
1220 setReceiverPointer(rec);
1227 return TSInfo->getType();
1235 if (getReceiverKind() == Class)
1242 setReceiverPointer(TSInfo);
1248 if (getReceiverKind() == SuperInstance || getReceiverKind() == SuperClass)
1283 if (getReceiverKind() == SuperInstance || getReceiverKind() == SuperClass)
1290 Kind = IsInstanceSuper? SuperInstance : SuperClass;
1304 return reinterpret_cast<const ObjCMethodDecl *
>(SelectorOrMethod);
1318 SelectorOrMethod =
reinterpret_cast<uintptr_t>(MD);
1322 if (HasMethod)
return getMethodDecl()->getMethodFamily();
1323 return getSelector().getMethodFamily();
1333 return reinterpret_cast<Expr **
>(getTrailingObjects<void *>() + 1);
1336 return reinterpret_cast<const Expr *
const *
>(getTrailingObjects<void *>() +
1342 assert(Arg < NumArgs &&
"Arg access out of range!");
1343 return getArgs()[Arg];
1346 assert(Arg < NumArgs &&
"Arg access out of range!");
1347 return getArgs()[Arg];
1352 assert(Arg < NumArgs &&
"Arg access out of range!");
1353 getArgs()[Arg] = ArgExpr;
1368 return getSelectorLoc(0);
1372 assert(Index < getNumSelectorLocs() &&
"Index out of range!");
1373 if (hasStandardSelLocs())
1376 llvm::makeArrayRef(const_cast<Expr**>(getArgs()),
1379 return getStoredSelLocs()[Index];
1408 return llvm::make_range(arg_begin(), arg_end());
1411 llvm::iterator_range<const_arg_iterator>
arguments()
const {
1412 return llvm::make_range(arg_begin(), arg_end());
1418 return reinterpret_cast<Stmt **
>(getArgs() + NumArgs);
1422 return reinterpret_cast<Stmt const * const*
>(getArgs());
1426 return reinterpret_cast<Stmt const * const*
>(getArgs() + NumArgs);
1456 Base(base), IsaMemberLoc(l), OpLoc(oploc), IsArrow(isarrow) {}
1476 return getBase()->getLocStart();
1480 return getBase()->getLocEnd();
1526 :
Expr(ObjCIndirectCopyRestoreExprClass, Empty) {}
1528 void setShouldCopy(
bool shouldCopy) {
1539 setShouldCopy(shouldCopy);
1558 return getSubExpr()->getExprLoc();
1562 return s->
getStmtClass() == ObjCIndirectCopyRestoreExprClass;
1589 CK, Operand, 0, TSInfo),
1590 LParenLoc(LParenLoc), BridgeKeywordLoc(BridgeKeywordLoc), Kind(Kind) {}
1604 StringRef getBridgeKindName()
const;
1612 return getSubExpr()->getLocEnd();
1644 VersionToCheck(VersionToCheck), AtLoc(AtLoc), RParen(RParen) {}
1647 :
Expr(ObjCAvailabilityCheckExprClass, Shell) {}
1662 return T->
getStmtClass() == ObjCAvailabilityCheckExprClass;
1668 #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 getOpLoc() const
ObjCDictionaryElement getKeyValueElement(unsigned Index) const
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
Represents a version number in the form major[.minor[.subminor[.build]]].
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.
bool isSuperReceiver() const
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)
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.
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)
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
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()
Const iterator for iterating over Stmt * arrays that contain only Expr *.
SourceLocation getLocEnd() const
SourceLocation getLocEnd() const LLVM_READONLY
static bool classof(const Stmt *T)
SourceLocation getRBracket() const
CastKind
CastKind - The kind of operation required for a conversion.
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getRParenLoc() const
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
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
const FunctionProtoType * T
SourceLocation getExprLoc() const LLVM_READONLY
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 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)
bool empty() const
Determine whether this version information is empty (e.g., all version components are zero)...
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 getLocEnd() const LLVM_READONLY
SourceLocation getLocStart() const LLVM_READONLY
ObjCSelectorExpr(EmptyShell Empty)
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
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
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.
void setBaseExpr(Stmt *S)
void setEncodedTypeSourceInfo(TypeSourceInfo *EncType)
const ObjCMethodDecl * getMethodDecl() const
ObjCBoxedExpr - used for generalized expression boxing.
static QualType getFromOpaquePtr(const void *Ptr)
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...
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 getLocStart() const
SourceLocation getLocation() const
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)
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
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
static bool classof(const Stmt *T)
SourceLocation getAtLoc() 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.
QualType getSuperReceiverType() const
Defines the clang::SourceLocation class and associated facilities.
llvm::iterator_range< arg_iterator > arguments()
void setSourceRange(SourceRange R)
SourceLocation getSelectorStartLoc() const
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)
Defines the clang::VersionTuple class, which represents a version in the form major[.minor[.subminor]].
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 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 getLocStart() const LLVM_READONLY
SourceLocation getBegin() const
static bool classof(const Stmt *T)
void setArg(unsigned Arg, Expr *ArgExpr)
setArg - Set the specified argument.
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...