Home | History | Annotate | Download | only in AST

Lines Matching refs:Expr

1 //===--- Expr.h - Classes for representing expressions ----------*- C++ -*-===//
10 // This file defines the Expr interface and subclasses.
72 Expr *RHS;
93 SubobjectAdjustment(const MemberPointerType *MPT, Expr *RHS)
100 /// Expr - This represents one expression. Note that Expr's are subclasses of
104 class Expr : public Stmt {
108 Expr(StmtClass SC, QualType T, ExprValueKind VK, ExprObjectKind OK,
122 explicit Expr(StmtClass SC, EmptyShell) : Stmt(SC) { }
128 // will not have reference type (C++ [expr]p6). Use
130 // type. Additionally, inspect Expr::isLvalue to determine whether
154 /// type-dependent (C++ [temp.dep.expr]), which means that its type
226 /// be warned about if the result is unused. If so, fill in expr, location,
227 /// and ranges with expr to warn on and source locations/ranges appropriate
229 bool isUnusedResultAWarning(const Expr *&WarnExpr, SourceLocation &Loc,
330 friend class Expr;
444 return const_cast<Expr*>(this)->getSourceBitField();
486 /// [expr.const]p5.
501 /// [expr.const]p5.
518 static bool isPotentialConstantExprUnevaluated(Expr *E,
526 /// it is used to store the address of first non constant expr.
528 const Expr **Culprit = nullptr) const;
641 ArrayRef<const Expr*> Args) const;
643 /// \brief If the current Expr is a pointer, this will try to statically
648 /// \param Type - How to evaluate the size of the Expr, as defined by the
708 static QualType findBoundMemberType(const Expr *expr);
712 Expr *IgnoreImpCasts() LLVM_READONLY;
716 Expr *IgnoreImplicit() LLVM_READONLY {
717 return cast<Expr>(Stmt::IgnoreImplicit());
720 const Expr *IgnoreImplicit() const LLVM_READONLY {
721 return const_cast<Expr*>(this)->IgnoreImplicit();
724 /// IgnoreParens - Ignore parentheses. If this Expr is a ParenExpr, return
727 /// Otherwise, the method returns the current Expr.
728 Expr *IgnoreParens() LLVM_READONLY;
732 Expr *IgnoreParenCasts() LLVM_READONLY;
735 Expr *IgnoreCasts() LLVM_READONLY;
739 Expr *IgnoreParenImpCasts() LLVM_READONLY;
741 /// IgnoreConversionOperator - Ignore conversion operator. If this Expr is a
743 Expr *IgnoreConversionOperator() LLVM_READONLY;
745 const Expr *IgnoreConversionOperator() const LLVM_READONLY {
746 return const_cast<Expr*>(this)->IgnoreConversionOperator();
749 const Expr *IgnoreParenImpCasts() const LLVM_READONLY {
750 return const_cast<Expr*>(this)->IgnoreParenImpCasts();
755 Expr *IgnoreParenLValueCasts() LLVM_READONLY;
757 const Expr *IgnoreParenLValueCasts() const LLVM_READONLY {
758 return const_cast<Expr*>(this)->IgnoreParenLValueCasts();
764 Expr *IgnoreParenNoopCasts(ASTContext &Ctx) LLVM_READONLY;
767 Expr *ignoreParenBaseCasts() LLVM_READONLY;
769 const Expr *ignoreParenBaseCasts() const LLVM_READONLY {
770 return const_cast<Expr*>(this)->ignoreParenBaseCasts();
789 const Expr *IgnoreImpCasts() const LLVM_READONLY {
790 return const_cast<Expr*>(this)->IgnoreImpCasts();
792 const Expr *IgnoreParens() const LLVM_READONLY {
793 return const_cast<Expr*>(this)->IgnoreParens();
795 const Expr *IgnoreParenCasts() const LLVM_READONLY {
796 return const_cast<Expr*>(this)->IgnoreParenCasts();
799 const Expr *IgnoreCasts() const LLVM_READONLY {
800 return const_cast<Expr*>(this)->IgnoreCasts();
803 const Expr *IgnoreParenNoopCasts(ASTContext &Ctx) const LLVM_READONLY {
804 return const_cast<Expr*>(this)->IgnoreParenNoopCasts(Ctx);
807 static bool hasAnyTypeDependentArguments(ArrayRef<Expr *> Exprs);
821 const Expr *skipRValueSubobjectAdjustments(
822 SmallVectorImpl<const Expr *> &CommaLHS,
840 class OpaqueValueExpr : public Expr {
842 Expr *SourceExpr;
848 Expr *SourceExpr = nullptr)
849 : Expr(OpaqueValueExprClass, T, VK, OK,
861 static const OpaqueValueExpr *findInCopyConstruct(const Expr *expr);
864 : Expr(OpaqueValueExprClass, Empty) { }
892 Expr *getSourceExpr() const { return SourceExpr; }
922 class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) DeclRefExpr : public Expr {
974 : Expr(DeclRefExprClass, Empty) { }
984 : Expr(DeclRefExprClass, T, VK, OK_Ordinary, false, false, false, false),
1203 class PredefinedExpr : public Expr {
1228 : Expr(PredefinedExprClass, Empty), Loc(), Type(Func), FnName(nullptr) {}
1307 class IntegerLiteral : public Expr, public APIntStorage {
1312 : Expr(IntegerLiteralClass, Empty) { }
1347 class CharacterLiteral : public Expr {
1363 : Expr(CharacterLiteralClass, type, VK_RValue, OK_Ordinary, false, false,
1370 CharacterLiteral(EmptyShell Empty) : Expr(CharacterLiteralClass, Empty) { }
1396 class FloatingLiteral : public Expr, private APFloatStorage {
1465 class ImaginaryLiteral : public Expr {
1468 ImaginaryLiteral(Expr *val, QualType Ty)
1469 : Expr(ImaginaryLiteralClass, Ty, VK_RValue, OK_Ordinary, false, false,
1475 : Expr(ImaginaryLiteralClass, Empty) { }
1477 const Expr *getSubExpr() const { return cast<Expr>(Val); }
1478 Expr *getSubExpr() { return cast<Expr>(Val); }
1479 void setSubExpr(Expr *E) { Val = E; }
1508 class StringLiteral : public Expr {
1534 Expr(StringLiteralClass, Ty, VK_LValue, OK_Ordinary, false, false, false,
1661 class ParenExpr : public Expr {
1665 ParenExpr(SourceLocation l, SourceLocation r, Expr *val)
1666 : Expr(ParenExprClass, val->getType(),
1675 : Expr(ParenExprClass, Empty) { }
1677 const Expr *getSubExpr() const { return cast<Expr>(Val); }
1678 Expr *getSubExpr() { return cast<Expr>(Val); }
1679 void setSubExpr(Expr *E) { Val = E; }
1710 class UnaryOperator : public Expr {
1720 UnaryOperator(Expr *input, Opcode opc, QualType type,
1722 : Expr(UnaryOperatorClass, type, VK, OK,
1732 : Expr(UnaryOperatorClass, Empty), Opc(UO_AddrOf) { }
1737 Expr *getSubExpr() const { return cast<Expr>(Val); }
1738 void setSubExpr(Expr *E) { Val = E; }
1823 class OffsetOfExpr : public Expr {
1825 // __builtin_offsetof(type, identifier(.identifier|[expr])*)
1849 /// - An unsigned index into the array of Expr*'s stored after this node
1931 ArrayRef<OffsetOfNode> comps, ArrayRef<Expr*> exprs,
1935 : Expr(OffsetOfExprClass, EmptyShell()),
1943 ArrayRef<Expr*> exprs, SourceLocation RParenLoc);
1977 Expr* getIndexExpr(unsigned Idx) {
1979 return reinterpret_cast<Expr **>(
1982 const Expr *getIndexExpr(unsigned Idx) const {
1986 void setIndexExpr(unsigned Idx, Expr* E) {
1988 reinterpret_cast<Expr **>(
2015 class UnaryExprOrTypeTraitExpr : public Expr {
2026 Expr(UnaryExprOrTypeTraitExprClass, resultType, VK_RValue, OK_Ordinary,
2027 false, // Never type-dependent (C++ [temp.dep.expr]p3).
2038 UnaryExprOrTypeTraitExpr(UnaryExprOrTypeTrait ExprKind, Expr *E,
2044 : Expr(UnaryExprOrTypeTraitExprClass, Empty) { }
2056 assert(isArgumentType() && "calling getArgumentType() when arg is expr");
2059 Expr *getArgumentExpr() {
2061 return static_cast<Expr*>(Argument.Ex);
2063 const Expr *getArgumentExpr() const {
2067 void setArgument(Expr *E) {
2104 class ArraySubscriptExpr : public Expr {
2109 ArraySubscriptExpr(Expr *lhs, Expr *rhs, QualType t,
2112 : Expr(ArraySubscriptExprClass, t, VK, OK,
2126 : Expr(ArraySubscriptExprClass, Shell) { }
2137 Expr *getLHS() { return cast<Expr>(SubExprs[LHS]); }
2138 const Expr *getLHS() const { return cast<Expr>(SubExprs[LHS]); }
2139 void setLHS(Expr *E) { SubExprs[LHS] = E; }
2141 Expr *getRHS() { return cast<Expr>(SubExprs[RHS]); }
2142 const Expr *getRHS() const { return cast<Expr>(SubExprs[RHS]); }
2143 void setRHS(Expr *E) { SubExprs[RHS] = E; }
2145 Expr *getBase() {
2146 return cast<Expr>(getRHS()->getType()->isIntegerType() ? getLHS():getRHS());
2149 const Expr *getBase() const {
2150 return cast<Expr>(getRHS()->getType()->isIntegerType() ? getLHS():getRHS());
2153 Expr *getIdx() {
2154 return cast<Expr>(getRHS()->getType()->isIntegerType() ? getRHS():getLHS());
2157 const Expr *getIdx() const {
2158 return cast<Expr>(getRHS()->getType()->isIntegerType() ? getRHS():getLHS());
2183 /// CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
2189 class CallExpr : public Expr {
2197 CallExpr(const ASTContext& C, StmtClass SC, Expr *fn, unsigned NumPreArgs,
2198 ArrayRef<Expr*> args, QualType t, ExprValueKind VK,
2219 CallExpr(const ASTContext& C, Expr *fn, ArrayRef<Expr*> args, QualType t,
2225 const Expr *getCallee() const { return cast<Expr>(SubExprs[FN]); }
2226 Expr *getCallee() { return cast<Expr>(SubExprs[FN]); }
2227 void setCallee(Expr *F) { SubExprs[FN] = F; }
2245 Expr **getArgs() {
2246 return reinterpret_cast<Expr **>(SubExprs+getNumPreArgs()+PREARGS_START);
2248 const Expr *const *getArgs() const {
2253 Expr *getArg(unsigned Arg) {
2255 return cast_or_null<Expr>(SubExprs[Arg + getNumPreArgs() + PREARGS_START]);
2257 const Expr *getArg(unsigned Arg) const {
2259 return cast_or_null<Expr>(SubExprs[Arg + getNumPreArgs() + PREARGS_START]);
2263 void setArg(unsigned Arg, Expr *ArgExpr) {
2315 /// getCallReturnType - Get the return type of the call expr. This is not
2316 /// always the type of the expr itself, if the return type is a reference
2340 class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) MemberExpr : public Expr {
2404 MemberExpr(Expr *base, bool isarrow, SourceLocation operatorloc,
2407 : Expr(MemberExprClass, ty, VK, OK, base->isTypeDependent(),
2421 MemberExpr(Expr *base, bool isarrow, SourceLocation operatorloc,
2424 : Expr(MemberExprClass, ty, VK, OK, base->isTypeDependent(),
2432 static MemberExpr *Create(const ASTContext &C, Expr *base, bool isarrow,
2441 void setBase(Expr *E) { Base = E; }
2442 Expr *getBase() const { return cast<Expr>(Base); }
2636 class CompoundLiteralExpr : public Expr {
2644 /// The int part of the pair stores whether this expr is file scope.
2649 QualType T, ExprValueKind VK, Expr *init, bool fileScope)
2650 : Expr(CompoundLiteralExprClass, T, VK, OK_Ordinary,
2660 : Expr(CompoundLiteralExprClass, Empty) { }
2662 const Expr *getInitializer() const { return cast<Expr>(Init); }
2663 Expr *getInitializer() { return cast<Expr>(Init); }
2664 void setInitializer(Expr *E) { Init = E; }
2706 class CastExpr : public Expr {
2725 Expr *op, unsigned BasePathSize)
2726 : Expr(SC, ty, VK, OK_Ordinary,
2728 // dependent (C++ [temp.dep.expr]p3).
2749 : Expr(SC, Empty) {
2758 Expr *getSubExpr() { return cast<Expr>(Op); }
2759 const Expr *getSubExpr() const { return cast<Expr>(Op); }
2760 void setSubExpr(Expr *E) { Op = E; }
2765 Expr *getSubExprAsWritten();
2766 const Expr *getSubExprAsWritten() const {
2812 ImplicitCastExpr(QualType ty, CastKind kind, Expr *op,
2823 ImplicitCastExpr(OnStack_t _, QualType ty, CastKind kind, Expr *op,
2829 CastKind Kind, Expr *Operand,
2848 inline Expr *Expr::IgnoreImpCasts() {
2849 Expr *e = this;
2878 CastKind kind, Expr *op, unsigned PathSize,
2903 /// cast in C++ (C++ [expr.cast]), which uses the syntax
2904 /// (Type)expr. For example: @c (int)f.
2909 CStyleCastExpr(QualType exprTy, ExprValueKind vk, CastKind kind, Expr *op,
2922 Expr *Op, const CXXCastPath *BasePath,
2963 class BinaryOperator : public Expr {
2981 BinaryOperator(Expr *lhs, Expr *rhs, Opcode opc, QualType ResTy,
2984 : Expr(BinaryOperatorClass, ResTy, VK, OK,
3000 : Expr(BinaryOperatorClass, Empty), Opc(BO_Comma) { }
3009 Expr *getLHS() const { return cast<Expr>(SubExprs[LHS]); }
3010 void setLHS(Expr *E) { SubExprs[LHS] = E; }
3011 Expr *getRHS() const { return cast<Expr>(SubExprs[RHS]); }
3012 void setRHS(Expr *E) { SubExprs[RHS] = E; }
3133 BinaryOperator(Expr *lhs, Expr *rhs, Opcode opc, QualType ResTy,
3136 : Expr(CompoundAssignOperatorClass, ResTy, VK, OK,
3149 : Expr(SC, Empty), Opc(BO_MulAssign) { }
3162 CompoundAssignOperator(Expr *lhs, Expr *rhs, Opcode opc, QualType ResType,
3194 class AbstractConditionalOperator : public Expr {
3205 : Expr(SC, T, VK, OK, TD, VD, ID, ContainsUnexpandedParameterPack),
3209 : Expr(SC, Empty) { }
3214 Expr *getCond() const;
3218 Expr *getTrueExpr() const;
3223 Expr *getFalseExpr() const;
3242 ConditionalOperator(Expr *cond, SourceLocation QLoc, Expr *lhs,
3243 SourceLocation CLoc, Expr *rhs,
3270 Expr *getCond() const { return cast<Expr>(SubExprs[COND]); }
3274 Expr *getTrueExpr() const { return cast<Expr>(SubExprs[LHS]); }
3279 Expr *getFalseExpr() const { return cast<Expr>(SubExprs[RHS]); }
3281 Expr *getLHS() const { return cast<Expr>(SubExprs[LHS]); }
3282 Expr *getRHS() const { return cast<Expr>(SubExprs[RHS]); }
3319 BinaryConditionalOperator(Expr *common, OpaqueValueExpr *opaqueValue,
3320 Expr *cond, Expr *lhs, Expr *rhs,
3346 Expr *getCommon() const { return cast<Expr>(SubExprs[COMMON]); }
3353 Expr *getCond() const { return cast<Expr>(SubExprs[COND]); }
3358 Expr *getTrueExpr() const {
3359 return cast<Expr>(SubExprs[LHS]);
3365 Expr *getFalseExpr() const {
3366 return cast<Expr>(SubExprs[RHS]);
3386 inline Expr *AbstractConditionalOperator::getCond() const {
3392 inline Expr *AbstractConditionalOperator::getTrueExpr() const {
3398 inline Expr *AbstractConditionalOperator::getFalseExpr() const {
3405 class AddrLabelExpr : public Expr {
3411 : Expr(AddrLabelExprClass, t, VK_RValue, OK_Ordinary, false, false, false,
3417 : Expr(AddrLabelExprClass, Empty) { }
3446 class StmtExpr : public Expr {
3455 Expr(StmtExprClass, T, VK_RValue, OK_Ordinary,
3460 explicit StmtExpr(EmptyShell Empty) : Expr(StmtExprClass, Empty) { }
3488 class ShuffleVectorExpr : public Expr {
3499 ShuffleVectorExpr(const ASTContext &C, ArrayRef<Expr*> args, QualType Type,
3504 : Expr(ShuffleVectorExprClass, Empty), SubExprs(nullptr) { }
3525 Expr **getSubExprs() { return reinterpret_cast<Expr **>(SubExprs); }
3527 /// getExpr - Return the Expr at the specified index.
3528 Expr *getExpr(unsigned Index) {
3530 return cast<Expr>(SubExprs[Index]);
3532 const Expr *getExpr(unsigned Index) const {
3534 return cast<Expr>(SubExprs[Index]);
3537 void setExprs(const ASTContext &C, ArrayRef<Expr *> Exprs);
3553 class ConvertVectorExpr : public Expr {
3561 explicit ConvertVectorExpr(EmptyShell Empty) : Expr(ConvertVectorExprClass, Empty) {}
3564 ConvertVectorExpr(Expr* SrcExpr, TypeSourceInfo *TI, QualType DstType,
3567 : Expr(ConvertVectorExprClass, DstType, VK, OK,
3576 /// getSrcExpr - Return the Expr to be converted.
3577 Expr *getSrcExpr() const { return cast<Expr>(SrcExpr); }
3613 class ChooseExpr : public Expr {
3619 ChooseExpr(SourceLocation BLoc, Expr *cond, Expr *lhs, Expr *rhs,
3623 : Expr(ChooseExprClass, t, VK, OK, TypeDependent, ValueDependent,
3637 explicit ChooseExpr(EmptyShell Empty) : Expr(ChooseExprClass, Empty) { }
3654 Expr *getChosenSubExpr() const {
3658 Expr *getCond() const { return cast<Expr>(SubExprs[COND]); }
3659 void setCond(Expr *E) { SubExprs[COND] = E; }
3660 Expr *getLHS() const { return cast<Expr>(SubExprs[LHS]); }
3661 void setLHS(Expr *E) { SubExprs[LHS] = E; }
3662 Expr *getRHS() const { return cast<Expr>(SubExprs[RHS]); }
3663 void setRHS(Expr *E) { SubExprs[RHS] = E; }
3690 class GNUNullExpr : public Expr {
3696 : Expr(GNUNullExprClass, Ty, VK_RValue, OK_Ordinary, false, false, false,
3701 explicit GNUNullExpr(EmptyShell Empty) : Expr(GNUNullExprClass, Empty) { }
3721 class VAArgExpr : public Expr {
3726 VAArgExpr(SourceLocation BLoc, Expr *e, TypeSourceInfo *TInfo,
3728 : Expr(VAArgExprClass, t, VK_RValue, OK_Ordinary, t->isDependentType(),
3737 : Expr(VAArgExprClass, Empty), Val(nullptr), TInfo(nullptr, false) {}
3739 const Expr *getSubExpr() const { return cast<Expr>(Val); }
3740 Expr *getSubExpr() { return cast<Expr>(Val); }
3741 void setSubExpr(Expr *E) { Val = E; }
3812 class InitListExpr : public Expr {
3832 llvm::PointerUnion<Expr *, FieldDecl *> ArrayFillerOrUnionFieldInit;
3836 ArrayRef<Expr*> initExprs, SourceLocation rbraceloc);
3840 : Expr(InitListExprClass, Empty) { }
3845 Expr **getInits() { return reinterpret_cast<Expr **>(InitExprs.data()); }
3847 ArrayRef<Expr *> inits() {
3851 const Expr *getInit(unsigned Init) const {
3853 return cast_or_null<Expr>(InitExprs[Init]);
3856 Expr *getInit(unsigned Init) {
3858 return cast_or_null<Expr>(InitExprs[Init]);
3861 void setInit(unsigned Init, Expr *expr) {
3863 InitExprs[Init] = expr;
3865 if (expr) {
3866 ExprBits.TypeDependent |= expr->isTypeDependent();
3867 ExprBits.ValueDependent |= expr->isValueDependent();
3868 ExprBits.InstantiationDependent |= expr->isInstantiationDependent();
3870 expr->containsUnexpandedParameterPack();
3886 /// expression @p expr, and returns the old expression at that
3892 Expr *updateInit(const ASTContext &C, unsigned Init, Expr *expr);
3897 Expr *getArrayFiller() {
3898 return ArrayFillerOrUnionFieldInit.dyn_cast<Expr *>();
3900 const Expr *getArrayFiller() const {
3903 void setArrayFiller(Expr *filler);
4019 class DesignatedInitExpr : public Expr {
4049 ArrayRef<Expr*> IndexExprs, Expr *Init);
4052 : Expr(DesignatedInitExprClass, EmptyShell()),
4211 ArrayRef<Expr*> IndexExprs,
4213 bool GNUSyntax, Expr *Init);
4268 Expr *getArrayIndex(const Designator &D) const;
4269 Expr *getArrayRangeStart(const Designator &D) const;
4270 Expr *getArrayRangeEnd(const Designator &D) const;
4283 Expr *getInit() const {
4284 return cast<Expr>(*const_cast<DesignatedInitExpr*>(this)->child_begin());
4287 void setInit(Expr *init) {
4297 Expr *getSubExpr(unsigned Idx) const {
4299 return cast<Expr>(reinterpret_cast<Stmt *const *>(this + 1)[Idx]);
4302 void setSubExpr(unsigned Idx, Expr *E) {
4337 class NoInitExpr : public Expr {
4340 : Expr(NoInitExprClass, ty, VK_RValue, OK_Ordinary,
4344 : Expr(NoInitExprClass, Empty) { }
4370 class DesignatedInitUpdateExpr : public Expr {
4377 Expr *baseExprs, SourceLocation rBraceLoc);
4380 : Expr(DesignatedInitUpdateExprClass, Empty) { }
4389 Expr *getBase() const { return cast<Expr>(BaseAndUpdaterExprs[0]); }
4390 void setBase(Expr *Base) { BaseAndUpdaterExprs[0] = Base; }
4395 void setUpdater(Expr *Updater) { BaseAndUpdaterExprs[1] = Updater; }
4412 class ImplicitValueInitExpr : public Expr {
4415 : Expr(ImplicitValueInitExprClass, ty, VK_RValue, OK_Ordinary,
4420 : Expr(ImplicitValueInitExprClass, Empty) { }
4435 class ParenListExpr : public Expr {
4442 ArrayRef<Expr*> exprs, SourceLocation rparenloc);
4445 explicit ParenListExpr(EmptyShell Empty) : Expr(ParenListExprClass, Empty) { }
4449 const Expr* getExpr(unsigned Init) const {
4451 return cast_or_null<Expr>(Exprs[Init]);
4454 Expr* getExpr(unsigned Init) {
4456 return cast_or_null<Expr>(Exprs[Init]);
4459 Expr **getExprs() { return reinterpret_cast<Expr **>(Exprs); }
4461 ArrayRef<Expr *> exprs() {
4510 class GenericSelectionExpr : public Expr {
4519 SourceLocation GenericLoc, Expr *ControllingExpr,
4521 ArrayRef<Expr*> AssocExprs,
4528 SourceLocation GenericLoc, Expr *ControllingExpr,
4530 ArrayRef<Expr*> AssocExprs,
4535 : Expr(GenericSelectionExprClass, Empty) { }
4543 const Expr *getAssocExpr(unsigned i) const {
4544 return cast<Expr>(SubExprs[END_EXPR+i]);
4546 Expr *getAssocExpr(unsigned i) { return cast<Expr>(SubExprs[END_EXPR+i]); }
4560 const Expr *getControllingExpr() const {
4561 return cast<Expr>(SubExprs[CONTROLLING]);
4563 Expr *getControllingExpr() { return cast<Expr>(SubExprs[CONTROLLING]); }
4578 const Expr *getResultExpr() const { return getAssocExpr(getResultIndex()); }
4579 Expr *getResultExpr() { return getAssocExpr(getResultIndex()); }
4606 class ExtVectorElementExpr : public Expr {
4611 ExtVectorElementExpr(QualType ty, ExprValueKind VK, Expr *base,
4613 : Expr(ExtVectorElementExprClass, ty, VK,
4622 : Expr(ExtVectorElementExprClass, Empty) { }
4624 const Expr *getBase() const { return cast<Expr>(Base); }
4625 Expr *getBase() { return cast<Expr>(Base); }
4626 void setBase(Expr *E) { Base = E; }
4664 class BlockExpr : public Expr {
4669 : Expr(BlockExprClass, ty, VK_RValue, OK_Ordinary,
4676 explicit BlockExpr(EmptyShell Empty) : Expr(BlockExprClass, Empty) { }
4706 Expr {
4713 explicit AsTypeExpr(EmptyShell Empty) : Expr(AsTypeExprClass, Empty) {}
4716 AsTypeExpr(Expr* SrcExpr, QualType DstType,
4719 : Expr(AsTypeExprClass, DstType, VK, OK,
4728 /// getSrcExpr - Return the Expr to be converted.
4729 Expr *getSrcExpr() const { return cast<Expr>(SrcExpr); }
4776 class PseudoObjectExpr : public Expr {
4788 Expr **getSubExprsBuffer() { return reinterpret_cast<Expr**>(this + 1); }
4789 const Expr * const *getSubExprsBuffer() const {
4790 return reinterpret_cast<const Expr * const *>(this + 1);
4796 Expr *syntactic, ArrayRef<Expr*> semantic,
4810 static PseudoObjectExpr *Create(const ASTContext &Context, Expr *syntactic,
4811 ArrayRef<Expr*> semantic,
4820 Expr *getSyntacticForm() { return getSubExprsBuffer()[0]; }
4821 const Expr *getSyntacticForm() const { return getSubExprsBuffer()[0]; }
4831 Expr *getResultExpr() {
4836 const Expr *getResultExpr() const {
4842 typedef Expr * const *semantics_iterator;
4843 typedef const Expr * const *const_semantics_iterator;
4864 Expr *getSemanticExpr(unsigned index) {
4868 const Expr *getSemanticExpr(unsigned index) const {
4898 class AtomicExpr : public Expr {
4928 AtomicExpr(SourceLocation BLoc, ArrayRef<Expr*> args, QualType t,
4936 explicit AtomicExpr(EmptyShell Empty) : Expr(AtomicExprClass, Empty) { }
4938 Expr *getPtr() const {
4939 return cast<Expr>(SubExprs[PTR]);
4941 Expr *getOrder() const {
4942 return cast<Expr>(SubExprs[ORDER]);
4944 Expr *getVal1() const {
4946 return cast<Expr>(SubExprs[ORDER]);
4948 return cast<Expr>(SubExprs[VAL1]);
4950 Expr *getOrderFail() const {
4952 return cast<Expr>(SubExprs[ORDER_FAIL]);
4954 Expr *getVal2() const {
4956 return cast<Expr>(SubExprs[ORDER_FAIL]);
4958 return cast<Expr>(SubExprs[VAL2]);
4960 Expr *getWeak() const {
4962 return cast<Expr>(SubExprs[WEAK]);
4968 Expr **getSubExprs() { return reinterpret_cast<Expr **>(SubExprs); }
4999 class TypoExpr : public Expr {
5002 : Expr(TypoExprClass, T, VK_LValue, OK_Ordinary,