14 #ifndef LLVM_CLANG_AST_EXPROBJC_H
15 #define LLVM_CLANG_AST_EXPROBJC_H
21 #include "llvm/Support/Compiler.h"
36 String(SL), AtLoc(L) {}
38 :
Expr(ObjCStringLiteralClass, Empty) {}
51 return T->getStmtClass() == ObjCStringLiteralClass;
55 child_range
children() {
return child_range(&String, &String+1); }
69 :
Expr(ObjCBoolLiteralExprClass, Empty) { }
81 return T->getStmtClass() == ObjCBoolLiteralExprClass;
85 child_range
children() {
return child_range(); }
102 SubExpr(E), BoxingMethod(method), Range(R) {}
104 :
Expr(ObjCBoxedExprClass, Empty) {}
122 return T->getStmtClass() == ObjCBoxedExprClass;
126 child_range
children() {
return child_range(&SubExpr, &SubExpr+1); }
131 return reinterpret_cast<Stmt const * const*
>(&SubExpr);
134 return reinterpret_cast<Stmt const * const*
>(&SubExpr + 1);
143 unsigned NumElements;
152 :
Expr(ObjCArrayLiteralClass, Empty), NumElements(NumElements) {}
161 unsigned NumElements);
168 return T->getStmtClass() == ObjCArrayLiteralClass;
176 return reinterpret_cast<const Expr * const*
>(
this + 1);
184 assert((Index < NumElements) &&
"Arg access out of range!");
188 assert((Index < NumElements) &&
"Arg access out of range!");
193 return ArrayWithObjectsMethod;
227 template <>
struct isPodLike<clang::ObjCDictionaryElement> : std::true_type {};
237 struct KeyValuePair {
244 struct ExpansionData {
251 unsigned NumExpansionsPlusOne;
255 unsigned NumElements : 31;
264 unsigned HasPackExpansions : 1;
270 bool HasPackExpansions,
275 bool HasPackExpansions)
276 :
Expr(ObjCDictionaryLiteralClass, Empty), NumElements(NumElements),
277 HasPackExpansions(HasPackExpansions) {}
279 KeyValuePair *getKeyValues() {
280 return reinterpret_cast<KeyValuePair *
>(
this + 1);
283 const KeyValuePair *getKeyValues()
const {
284 return reinterpret_cast<const KeyValuePair *
>(
this + 1);
287 ExpansionData *getExpansionData() {
288 if (!HasPackExpansions)
291 return reinterpret_cast<ExpansionData *
>(getKeyValues() + NumElements);
294 const ExpansionData *getExpansionData()
const {
295 if (!HasPackExpansions)
298 return reinterpret_cast<const ExpansionData *
>(getKeyValues()+NumElements);
304 bool HasPackExpansions,
309 unsigned NumElements,
310 bool HasPackExpansions);
317 assert((Index < NumElements) &&
"Arg access out of range!");
318 const KeyValuePair &KV = getKeyValues()[Index];
320 if (HasPackExpansions) {
321 const ExpansionData &Expansion = getExpansionData()[Index];
323 if (Expansion.NumExpansionsPlusOne > 0)
330 {
return DictWithObjectsMethod; }
337 return T->getStmtClass() == ObjCDictionaryLiteralClass;
344 return child_range(reinterpret_cast<Stmt **>(
this + 1),
345 reinterpret_cast<Stmt **>(
this + 1) + NumElements * 2);
363 EncodedType->
getType()->isDependentType(),
364 EncodedType->
getType()->isDependentType(),
365 EncodedType->
getType()->isInstantiationDependentType(),
367 EncodedType(EncodedType), AtLoc(at), RParenLoc(rp) {}
381 EncodedType = EncType;
388 return T->getStmtClass() == ObjCEncodeExprClass;
404 SelName(selInfo), AtLoc(at), RParenLoc(rp){}
406 :
Expr(ObjCSelectorExprClass, Empty) {}
423 return T->getStmtClass() == ObjCSelectorExprClass;
446 TheProtocol(protocol), AtLoc(at), ProtoLoc(protoLoc), RParenLoc(rp) {}
448 :
Expr(ObjCProtocolExprClass, Empty) {}
463 return T->getStmtClass() == ObjCProtocolExprClass;
488 bool arrow =
false,
bool freeIvar =
false) :
494 D(d),
Base(base), Loc(l), OpLoc(oploc),
495 IsArrow(arrow), IsFreeIvar(freeIvar) {}
498 :
Expr(ObjCIvarRefExprClass, Empty) {}
525 return T->getStmtClass() == ObjCIvarRefExprClass;
540 llvm::PointerIntPair<NamedDecl*, 1, bool> PropertyOrGetter;
545 enum MethodRefFlags {
547 MethodRef_Getter = 0x1,
548 MethodRef_Setter = 0x2
552 llvm::PointerIntPair<ObjCMethodDecl *, 2, unsigned> SetterAndMethodRefFlags;
565 llvm::PointerUnion3<Stmt*, const Type*, ObjCInterfaceDecl*> Receiver;
571 :
Expr(ObjCPropertyRefExprClass, t, VK, OK,
575 PropertyOrGetter(PD,
false), SetterAndMethodRefFlags(),
576 IdLoc(l), ReceiverLoc(), Receiver(base) {
583 :
Expr(ObjCPropertyRefExprClass, t, VK, OK,
584 false,
false, st->isInstantiationDependentType(),
586 PropertyOrGetter(PD,
false), SetterAndMethodRefFlags(),
587 IdLoc(l), ReceiverLoc(sl), Receiver(st.getTypePtr()) {
594 :
Expr(ObjCPropertyRefExprClass, T, VK, OK,
false,
597 PropertyOrGetter(Getter,
true), SetterAndMethodRefFlags(Setter, 0),
598 IdLoc(IdLoc), ReceiverLoc(), Receiver(Base) {
607 PropertyOrGetter(Getter,
true), SetterAndMethodRefFlags(Setter, 0),
608 IdLoc(IdLoc), ReceiverLoc(SuperLoc), Receiver(SuperTy.getTypePtr()) {
617 PropertyOrGetter(Getter,
true), SetterAndMethodRefFlags(Setter, 0),
618 IdLoc(IdLoc), ReceiverLoc(ReceiverLoc), Receiver(Receiver) {
623 :
Expr(ObjCPropertyRefExprClass, Empty) {}
630 return cast<ObjCPropertyDecl>(PropertyOrGetter.getPointer());
635 return cast_or_null<ObjCMethodDecl>(PropertyOrGetter.getPointer());
640 return SetterAndMethodRefFlags.getPointer();
659 return SetterAndMethodRefFlags.getInt() & MethodRef_Getter;
666 return SetterAndMethodRefFlags.getInt() & MethodRef_Setter;
670 setMethodRefFlag(MethodRef_Getter, val);
674 setMethodRefFlag(MethodRef_Setter, val);
678 return cast<Expr>(Receiver.get<
Stmt*>());
681 return cast<Expr>(Receiver.get<
Stmt*>());
707 return T->getStmtClass() == ObjCPropertyRefExprClass;
712 if (Receiver.is<
Stmt*>()) {
713 Stmt **begin =
reinterpret_cast<Stmt**
>(&Receiver);
714 return child_range(begin, begin+1);
716 return child_range();
723 PropertyOrGetter.setPointer(D);
724 PropertyOrGetter.setInt(
false);
725 SetterAndMethodRefFlags.setPointer(
nullptr);
726 SetterAndMethodRefFlags.setInt(methRefFlags);
729 unsigned methRefFlags) {
730 PropertyOrGetter.setPointer(Getter);
731 PropertyOrGetter.setInt(
true);
732 SetterAndMethodRefFlags.setPointer(Setter);
733 SetterAndMethodRefFlags.setInt(methRefFlags);
735 void setBase(
Expr *
Base) { Receiver = Base; }
736 void setSuperReceiver(QualType T) { Receiver = T.getTypePtr(); }
737 void setClassReceiver(ObjCInterfaceDecl *D) { Receiver = D; }
739 void setLocation(SourceLocation L) { IdLoc = L; }
740 void setReceiverLocation(SourceLocation Loc) { ReceiverLoc = Loc; }
742 void setMethodRefFlag(MethodRefFlags flag,
bool val) {
743 unsigned f = SetterAndMethodRefFlags.getInt();
748 SetterAndMethodRefFlags.setInt(f);
761 enum { BASE, KEY, END_EXPR };
762 Stmt* SubExprs[END_EXPR];
776 :
Expr(ObjCSubscriptRefExprClass, T, VK, OK,
783 GetAtIndexMethodDecl(getMethod),
784 SetAtIndexMethodDecl(setMethod)
785 {SubExprs[BASE] = base; SubExprs[KEY] = key;}
788 :
Expr(ObjCSubscriptRefExprClass, Empty) {}
801 return SubExprs[BASE]->getLocStart();
806 return T->getStmtClass() == ObjCSubscriptRefExprClass;
816 return GetAtIndexMethodDecl;
820 return SetAtIndexMethodDecl;
828 return child_range(SubExprs, SubExprs+END_EXPR);
862 uintptr_t SelectorOrMethod;
864 enum { NumArgsBitWidth = 16 };
868 unsigned NumArgs : NumArgsBitWidth;
870 void setNumArgs(
unsigned Num) {
871 assert((Num >> NumArgsBitWidth) == 0 &&
"Num of args is out of range!");
886 unsigned HasMethod : 1;
890 unsigned IsDelegateInitCall : 1;
894 unsigned IsImplicit : 1;
898 unsigned SelLocsKind : 2;
909 :
Expr(ObjCMessageExprClass, Empty), SelectorOrMethod(0),
Kind(0),
910 HasMethod(0), IsDelegateInitCall(0), IsImplicit(0), SelLocsKind(0) {
917 bool IsInstanceSuper,
952 void *getReceiverPointer()
const {
953 return *
const_cast<void **
>(
954 reinterpret_cast<const void * const*
>(
this + 1));
958 void setReceiverPointer(
void *
Value) {
959 *
reinterpret_cast<void **
>(
this + 1) = Value;
965 bool hasStandardSelLocs()
const {
980 unsigned getNumStoredSelLocs()
const {
981 if (hasStandardSelLocs())
994 unsigned NumStoredSelLocs);
1038 bool IsInstanceSuper,
1124 unsigned NumStoredSelLocs);
1154 return static_cast<Expr *
>(getReceiverPointer());
1166 setReceiverPointer(rec);
1173 return TSInfo->getType();
1188 setReceiverPointer(TSInfo);
1245 SelectorOrMethod =
reinterpret_cast<uintptr_t
>(S.
getAsOpaquePtr());
1250 return reinterpret_cast<const ObjCMethodDecl *
>(SelectorOrMethod);
1264 SelectorOrMethod =
reinterpret_cast<uintptr_t
>(MD);
1279 return reinterpret_cast<Expr **
>(
this + 1) + 1;
1282 return reinterpret_cast<const Expr *
const *
>(
this + 1) + 1;
1287 assert(Arg < NumArgs &&
"Arg access out of range!");
1288 return cast<Expr>(
getArgs()[Arg]);
1291 assert(Arg < NumArgs &&
"Arg access out of range!");
1292 return cast<Expr>(
getArgs()[Arg]);
1296 assert(Arg < NumArgs &&
"Arg access out of range!");
1316 if (hasStandardSelLocs())
1319 llvm::makeArrayRef(const_cast<Expr**>(
getArgs()),
1322 return getStoredSelLocs()[Index];
1344 return T->getStmtClass() == ObjCMessageExprClass;
1355 return reinterpret_cast<Stmt **
>(
getArgs() + NumArgs);
1358 return reinterpret_cast<Stmt const * const*
>(
getArgs());
1361 return reinterpret_cast<Stmt const * const*
>(
getArgs() + NumArgs);
1389 Base(base), IsaMemberLoc(l), OpLoc(oploc), IsArrow(isarrow) {}
1409 return getBase()->getLocStart();
1413 return getBase()->getLocEnd();
1421 return T->getStmtClass() == ObjCIsaExprClass;
1460 ObjCIndirectCopyRestoreExprBits.ShouldCopy =
shouldCopy;
1464 :
Expr(ObjCIndirectCopyRestoreExprClass, Empty) { }
1473 setShouldCopy(shouldCopy);
1481 bool shouldCopy()
const {
return ObjCIndirectCopyRestoreExprBits.ShouldCopy; }
1483 child_range
children() {
return child_range(&Operand, &Operand+1); }
1487 return Operand->getLocStart();
1496 return s->getStmtClass() == ObjCIndirectCopyRestoreExprClass;
1519 CK, Operand, 0, TSInfo),
1520 LParenLoc(LParenLoc), BridgeKeywordLoc(BridgeKeywordLoc), Kind(Kind) { }
1545 return T->getStmtClass() == ObjCBridgedCastExprClass;
The receiver is the instance of the superclass object.
For nullary selectors, immediately before the end: "[foo release]" / "-(void)release;" Or with a spac...
ConstExprIterator const_arg_iterator
SourceLocation getEnd() const
const Expr * getBase() const
Selector getGetterSelector() const
The receiver is an object instance.
Smart pointer class that efficiently represents Objective-C method names.
SourceLocation getLocStart() const LLVM_READONLY
static bool classof(const Stmt *T)
bool containsUnexpandedParameterPack() const
Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates)...
SourceLocation getLocEnd() const LLVM_READONLY
ObjCMethodFamily getMethodFamily() const
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getLocation() const
Expr(StmtClass SC, QualType T, ExprValueKind VK, ExprObjectKind OK, bool TD, bool VD, bool ID, bool ContainsUnexpandedParameterPack)
QualType getClassReceiver() const
Returns the type of a class message send, or NULL if the message is not a class message.
bool isDelegateInitCall() const
ObjCBridgeCastKind
The kind of bridging performed by the Objective-C bridge cast.
bool isMessagingGetter() const
True if the property reference will result in a message to the getter. This applies to both implicit ...
static ObjCMessageExpr * Create(const ASTContext &Context, QualType T, ExprValueKind VK, SourceLocation LBracLoc, SourceLocation SuperLoc, bool IsInstanceSuper, QualType SuperType, Selector Sel, ArrayRef< SourceLocation > SelLocs, ObjCMethodDecl *Method, ArrayRef< Expr * > Args, SourceLocation RBracLoc, bool isImplicit)
Create a message send to super.
const Expr * getInstanceReceiver() const
void setAtLoc(SourceLocation L)
ObjCMethodDecl * getAtIndexMethodDecl() const
void setRBracket(SourceLocation RB)
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getProtocolIdLoc() const
const Expr * getSubExpr() const
void getSelectorLocs(SmallVectorImpl< SourceLocation > &SelLocs) const
ObjCStringLiteral(EmptyShell Empty)
SourceLocation getRParenLoc() const
SourceLocation getExprLoc() const LLVM_READONLY
void setSuper(SourceLocation Loc, QualType T, bool IsInstanceSuper)
SourceLocation getLocStart() const LLVM_READONLY
unsigned getNumSelectorLocs() const
bool isMessagingSetter() const
True if the property reference will result in a message to the setter. This applies to both implicit ...
A container of type source information.
SourceLocation getLocStart() const LLVM_READONLY
void setInstanceReceiver(Expr *rec)
Turn this message send into an instance message that computes the receiver object with the given expr...
void * getAsOpaquePtr() const
SourceLocation getLocEnd() const LLVM_READONLY
ObjCBoxedExpr(Expr *E, QualType T, ObjCMethodDecl *method, SourceRange R)
static ObjCDictionaryLiteral * CreateEmpty(const ASTContext &C, unsigned NumElements, bool HasPackExpansions)
void setLocation(SourceLocation L)
bool isClassMessage() const
Determine whether this is an class message to either a specified class or to super.
SourceLocation getAtLoc() const
void setDelegateInitCall(bool isDelegate)
void setProtocol(ObjCProtocolDecl *P)
void * getAsOpaquePtr() const
ObjCPropertyRefExpr(ObjCPropertyDecl *PD, QualType t, ExprValueKind VK, ExprObjectKind OK, SourceLocation l, Expr *base)
ObjCDictionaryElement getKeyValueElement(unsigned Index) const
bool isExplicitProperty() const
void setOpLoc(SourceLocation L)
ObjCBridgedCastExpr(EmptyShell Shell)
Construct an empty Objective-C bridged cast.
static bool classof(const Stmt *T)
ObjCPropertyRefExpr(EmptyShell Empty)
SourceLocation getLParenLoc() const
ReceiverKind
The kind of receiver this message is sending to.
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation getLocEnd() const LLVM_READONLY
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
static bool classof(const Stmt *T)
SourceLocation getAtLoc() const
SourceLocation getLocEnd() const LLVM_READONLY
void setAtLoc(SourceLocation L)
SourceLocation getIsaMemberLoc() const
SourceLocation getBaseLocEnd() const LLVM_READONLY
SourceLocation getLocStart() const LLVM_READONLY
ObjCProtocolDecl * getProtocol() const
QualType getReceiverType() const
Retrieve the receiver type to which this message is being directed.
An element in an Objective-C dictionary literal.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
ObjCInterfaceDecl * getClassReceiver() const
const Expr * getArg(unsigned Arg) const
ObjCMethodFamily
A family of Objective-C methods.
static ObjCArrayLiteral * Create(const ASTContext &C, ArrayRef< Expr * > Elements, QualType T, ObjCMethodDecl *Method, SourceRange SR)
ObjCPropertyRefExpr(ObjCMethodDecl *Getter, ObjCMethodDecl *Setter, QualType T, ExprValueKind VK, ExprObjectKind OK, SourceLocation IdLoc, Expr *Base)
static ObjCMessageExpr * CreateEmpty(const ASTContext &Context, unsigned NumArgs, unsigned NumStoredSelLocs)
Create an empty Objective-C message expression, to be filled in by subsequent calls.
StringLiteral * getString()
ObjCEncodeExpr(EmptyShell Empty)
SourceLocation getLocEnd() const LLVM_READONLY
ObjCSubscriptRefExpr(Expr *base, Expr *key, QualType T, ExprValueKind VK, ExprObjectKind OK, ObjCMethodDecl *getMethod, ObjCMethodDecl *setMethod, SourceLocation RB)
SourceLocation getAtLoc() const
ObjCBoxedExpr(EmptyShell Empty)
SourceLocation getLocEnd() const LLVM_READONLY
ObjCSelectorExpr(QualType T, Selector selInfo, SourceLocation at, SourceLocation rp)
An r-value expression (a pr-value in the C++11 taxonomy) produces a temporary value.
SourceLocation getSuperLoc() const
Retrieve the location of the 'super' keyword for a class or instance message to 'super', otherwise an invalid source location.
ObjCBoolLiteralExpr(bool val, QualType Ty, SourceLocation l)
ObjCMethodDecl * getBoxingMethod() const
SelectorLocationsKind
Whether all locations of the selector identifiers are in a "standard" position.
bool isSpecificPlaceholderType(unsigned K) const
isSpecificPlaceholderType - Test for a specific placeholder type.
ObjCBridgeCastKind getBridgeKind() const
Determine which kind of bridge is being performed via this cast.
SourceLocation getLocStart() const LLVM_READONLY
ObjCMethodFamily getMethodFamily() const
Determines the family of this method.
QualType getSuperType() const
Retrieve the type referred to by 'super'.
void setSelector(Selector S)
bool isSuperReceiver() const
void setLocation(SourceLocation L)
Selector getSelector() const
bool isValueDependent() const
Selector getSetterName() const
SourceLocation getLocEnd() const LLVM_READONLY
void setString(StringLiteral *S)
static bool classof(const Stmt *T)
static ObjCSubscriptRefExpr * Create(const ASTContext &C, Expr *base, Expr *key, QualType T, ObjCMethodDecl *getMethod, ObjCMethodDecl *setMethod, SourceLocation RB)
StringRef getBridgeKindName() const
Retrieve the kind of bridge being performed as a string.
ObjCIsaExpr(Expr *base, bool isarrow, SourceLocation l, SourceLocation oploc, QualType ty)
Represents an Objective-C protocol declaration.
Expr * Key
The key for the dictionary element.
SourceLocation getLocStart() const LLVM_READONLY
An ordinary object is located at an address in memory.
SourceLocation getLocStart() const LLVM_READONLY
const Expr * getBase() const
Represents an ObjC class declaration.
ObjCMethodDecl * setAtIndexMethodDecl() const
ExprIterator arg_iterator
ObjCBoolLiteralExpr(EmptyShell Empty)
SourceLocation getReceiverLocation() const
SourceLocation getRParenLoc() const
SourceLocation getLocEnd() const LLVM_READONLY
static bool classof(const Stmt *T)
bool isInstanceMessage() const
Determine whether this is an instance message to either a computed object or to super.
CastKind
CastKind - The kind of operation required for a conversion.
SourceRange getSourceRange() const LLVM_READONLY
TypeSourceInfo * getEncodedTypeSourceInfo() const
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on a template...
bool isPackExpansion() const
Determines whether this dictionary element is a pack expansion.
bool isUnarySelector() const
SourceLocation getOpLoc() const
void setIsMessagingGetter(bool val=true)
ObjCEncodeExpr(QualType T, TypeSourceInfo *EncodedType, SourceLocation at, SourceLocation rp)
const ObjCMethodDecl * getMethodDecl() const
const_arg_iterator arg_begin() 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
unsigned getNumArgs() const
SourceLocation getExprLoc() const LLVM_READONLY
SourceRange getReceiverRange() const
Source range of the receiver.
ObjCMethodDecl * getImplicitPropertyGetter() const
SourceLocation getLocStart() const LLVM_READONLY
ObjCInterfaceDecl * getReceiverInterface() const
Retrieve the Objective-C interface to which this message is being directed, if known.
ObjCSelectorExpr used for @selector in Objective-C.
Expr ** getArgs()
Retrieve the arguments to this message, not including the receiver.
ObjCPropertyRefExpr(ObjCPropertyDecl *PD, QualType t, ExprValueKind VK, ExprObjectKind OK, SourceLocation l, SourceLocation sl, QualType st)
static ObjCDictionaryLiteral * Create(const ASTContext &C, ArrayRef< ObjCDictionaryElement > VK, bool HasPackExpansions, QualType T, ObjCMethodDecl *method, SourceRange SR)
static bool classof(const Stmt *T)
Selector getSelector() const
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c array literal.
ObjCStringLiteral(StringLiteral *SL, QualType T, SourceLocation L)
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
SourceLocation getLocation() const
Expr * getElement(unsigned Index)
getExpr - Return the Expr at the specified index.
Optional< unsigned > NumExpansions
The number of elements this pack expansion will expand to, if this is a pack expansion and is known...
void setRParenLoc(SourceLocation L)
An expression that sends a message to the given Objective-C object or class.
static bool classof(const Stmt *T)
void setAtLoc(SourceLocation L)
const ObjCIvarDecl * getDecl() const
void setRParenLoc(SourceLocation L)
The result type of a method or function.
ObjCIvarRefExpr(ObjCIvarDecl *d, QualType t, SourceLocation l, SourceLocation oploc, Expr *base, bool arrow=false, bool freeIvar=false)
Expr * getArg(unsigned Arg)
getArg - Return the specified argument.
SourceLocation getRightLoc() const
SourceLocation getLocEnd() const LLVM_READONLY
ObjCPropertyRefExpr(ObjCMethodDecl *Getter, ObjCMethodDecl *Setter, QualType T, ExprValueKind VK, ExprObjectKind OK, SourceLocation IdLoc, SourceLocation ReceiverLoc, ObjCInterfaceDecl *Receiver)
ConstExprIterator const_arg_iterator
SourceLocation getAtLoc() const
ObjCSubscriptRefExpr(EmptyShell Empty)
ObjCIndirectCopyRestoreExpr(Expr *operand, QualType type, bool shouldCopy)
static bool classof(const Stmt *T)
bool isIntegralOrEnumerationType() const
Determine whether this type is an integral or enumeration type.
SourceLocation getRBracket() const
const Expr * getElement(unsigned Index) const
Encodes a location in the source. The SourceManager can decode this to get at the full include stack...
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getLocStart() const LLVM_READONLY
ObjCSelectorExpr(EmptyShell Empty)
void setIsMessagingSetter(bool val=true)
const_arg_iterator arg_begin() const
bool isValid() const
Return true if this is a valid SourceLocation object.
SourceRange getSourceRange() const LLVM_READONLY
static bool classof(const Stmt *T)
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
QualType getReceiverType(const ASTContext &ctx) const
Determine the type of the base, regardless of the kind of receiver.
const Expr *const * getArgs() const
TypeSourceInfo * getClassReceiverTypeInfo() const
Returns a type-source information of a class message send, or NULL if the message is not a class mess...
void setClassReceiver(TypeSourceInfo *TSInfo)
SourceLocation getAtLoc() const
void setIsFreeIvar(bool A)
SourceLocation getLocStart() const LLVM_READONLY
Represents one property declaration in an Objective-C interface.
SourceLocation getBegin() const
bool isTypeDependent() const
SourceLocation getSelectorStartLoc() const
void setBaseExpr(Stmt *S)
void setEncodedTypeSourceInfo(TypeSourceInfo *EncType)
static QualType getFromOpaquePtr(const void *Ptr)
bool isObjectReceiver() const
QualType getType() const
Return the type wrapped by this type source info.
SourceLocation getExprLoc() const LLVM_READONLY
const Expr * getSubExpr() const
Expr * Value
The value of the dictionary element.
Expr ** getElements()
Retrieve elements of array of literals.
const Expr *const * getElements() const
Retrieve elements of array of literals.
Expr * getInstanceReceiver()
Returns the object expression (receiver) for an instance message, or null for a message that is not a...
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers...
bool isImplicitProperty() const
SourceLocation getSelectorLoc(unsigned Index) const
SourceLocation getOpLoc() const
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
SourceLocation getLocStart() const LLVM_READONLY
Reads an AST files chain containing the contents of a translation unit.
void setAtLoc(SourceLocation L)
bool isClassReceiver() const
SourceLocation EllipsisLoc
The location of the ellipsis, if this is a pack expansion.
void setDecl(ObjCIvarDecl *d)
static bool classof(const Stmt *T)
Selector getGetterName() const
Selector getSelector() const
ObjCMethodDecl * getArrayWithObjectsMethod() const
ObjCMethodFamily getMethodFamily() const
Derive the conventional family of this method.
static bool classof(const Stmt *T)
void setSelector(Selector S)
void setMethodDecl(ObjCMethodDecl *MD)
Expr * getBaseExpr() const
ObjCMethodDecl * getDictWithObjectsMethod() const
static bool classof(const Stmt *T)
SourceLocation getLeftLoc() const
const_arg_iterator arg_end() const
SourceLocation getLocEnd() const LLVM_READONLY
ObjCPropertyRefExpr(ObjCMethodDecl *Getter, ObjCMethodDecl *Setter, QualType T, ExprValueKind VK, ExprObjectKind OK, SourceLocation IdLoc, SourceLocation SuperLoc, QualType SuperTy)
SourceLocation getBridgeKeywordLoc() const
The location of the bridge keyword.
SourceLocation getStandardSelectorLoc(unsigned Index, Selector Sel, bool WithArgSpace, ArrayRef< Expr * > Args, SourceLocation EndLoc)
Get the "standard" location of a selector identifier, e.g: For nullary selectors, immediately before ']': "[foo release]".
static bool classof(const Stmt *s)
ObjCBridgedCastExpr(SourceLocation LParenLoc, ObjCBridgeCastKind Kind, CastKind CK, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *Operand)
QualType getSuperReceiverType() const
Expr * getKeyExpr() const
unsigned getNumArgs() const
Return the number of actual arguments in this message, not counting the receiver. ...
ObjCProtocolExpr(EmptyShell Empty)
void setRParenLoc(SourceLocation L)
ObjCPropertyDecl * getExplicitProperty() const
A bitfield object is a bitfield on a C or C++ record.
ObjCIvarRefExpr - A reference to an ObjC instance variable.
const StringLiteral * getString() const
Selector getSetterSelector() const
void setSourceRange(SourceRange R)
QualType getEncodedType() const
bool isImplicit() const
Indicates whether the message send was implicitly generated by the implementation. If false, it was written explicitly in the source code.
SourceLocation getLocEnd() const LLVM_READONLY
void setIsaMemberLoc(SourceLocation L)
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getLocStart() const LLVM_READONLY
const_arg_iterator arg_end() const
SourceLocation getLocation() const
void setOpLoc(SourceLocation L)
static bool classof(const Stmt *T)
bool isArraySubscriptRefExpr() const
static ObjCArrayLiteral * CreateEmpty(const ASTContext &C, unsigned NumElements)
ObjCProtocolExpr(QualType T, ObjCProtocolDecl *protocol, SourceLocation at, SourceLocation protoLoc, SourceLocation rp)
static bool classof(const Stmt *T)
An l-value expression is a reference to an object with independent storage.
A trivial tuple used to represent a source range.
ObjCMethodDecl * getMethodDecl()
SourceLocation getLocEnd() const LLVM_READONLY
The receiver is a superclass.
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
void setArg(unsigned Arg, Expr *ArgExpr)
setArg - Set the specified argument.
ObjCMethodDecl * getImplicitPropertySetter() const
unsigned getNumElements() const
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getRParenLoc() const