15 #ifndef LLVM_CLANG_AST_EXPRCXX_H
16 #define LLVM_CLANG_AST_EXPRCXX_H
26 #include "llvm/Support/Compiler.h"
32 class TemplateArgumentListInfo;
60 SourceRange getSourceRangeImpl()
const LLVM_READONLY;
65 :
CallExpr(C, CXXOperatorCallExprClass, fn, args, t, VK, operatorloc),
66 Operator(Op), FPFeatures(FPFeatures) {
67 Range = getSourceRangeImpl();
70 CallExpr(C, CXXOperatorCallExprClass, Empty) { }
78 return Opc == OO_Equal || Opc == OO_StarEqual ||
79 Opc == OO_SlashEqual || Opc == OO_PercentEqual ||
80 Opc == OO_PlusEqual || Opc == OO_MinusEqual ||
81 Opc == OO_LessLessEqual || Opc == OO_GreaterGreaterEqual ||
82 Opc == OO_AmpEqual || Opc == OO_CaretEqual ||
98 return (Operator < OO_Plus || Operator >= OO_Arrow ||
99 Operator == OO_PlusPlus || Operator == OO_MinusMinus)
140 :
CallExpr(C, CXXMemberCallExprClass, fn, args, t, VK, RP) {}
143 :
CallExpr(C, CXXMemberCallExprClass, Empty) { }
177 enum { CONFIG, END_PREARG };
183 :
CallExpr(C, CUDAKernelCallExprClass, fn, Config, args, t, VK, RP) {}
186 :
CallExpr(C, CUDAKernelCallExprClass, END_PREARG, Empty) { }
189 return cast_or_null<CallExpr>(
getPreArg(CONFIG));
199 "Cannot call setConfig if config is not null");
231 RParenLoc(RParenLoc), AngleBrackets(AngleBrackets) {}
254 case CXXStaticCastExprClass:
255 case CXXDynamicCastExprClass:
256 case CXXReinterpretCastExprClass:
257 case CXXConstCastExprClass:
277 writtenTy, l, RParenLoc, AngleBrackets) {}
279 explicit CXXStaticCastExpr(
EmptyShell Empty,
unsigned PathSize)
313 writtenTy, l, RParenLoc, AngleBrackets) {}
315 explicit CXXDynamicCastExpr(
EmptyShell Empty,
unsigned pathSize)
350 CXXBaseSpecifier *> {
352 Expr *op,
unsigned pathSize,
357 pathSize, writtenTy, l, RParenLoc, AngleBrackets) {}
359 CXXReinterpretCastExpr(
EmptyShell Empty,
unsigned pathSize)
373 return T->
getStmtClass() == CXXReinterpretCastExprClass;
394 0, writtenTy, l, RParenLoc, AngleBrackets) {}
432 :
CallExpr(C, UserDefinedLiteralClass, Fn, Args, T, VK, LitEndLoc),
433 UDSuffixLoc(SuffixLoc) {}
435 :
CallExpr(C, UserDefinedLiteralClass, Empty) {}
493 Value(val), Loc(l) {}
496 :
Expr(CXXBoolLiteralExprClass, Empty) { }
529 :
Expr(CXXNullPtrLiteralExprClass, Empty) { }
552 :
Expr(CXXStdInitializerListExprClass, Empty), SubExpr(
nullptr) {}
576 return S->
getStmtClass() == CXXStdInitializerListExprClass;
592 llvm::PointerUnion<Stmt *, TypeSourceInfo *> Operand;
601 Operand->
getType()->isDependentType(),
602 Operand->
getType()->isInstantiationDependentType(),
604 Operand(Operand), Range(R) { }
614 Operand(Operand), Range(R) { }
617 :
Expr(CXXTypeidExprClass, Empty) {
619 Operand = (
Expr*)
nullptr;
636 assert(
isTypeOperand() &&
"Cannot call getTypeOperand for typeid(expr)");
641 assert(
isTypeOperand() &&
"Cannot call getTypeOperand for typeid(expr)");
646 assert(!
isTypeOperand() &&
"Cannot call getExprOperand for typeid(type)");
647 return static_cast<Expr*
>(Operand.get<
Stmt *>());
651 assert(!
isTypeOperand() &&
"Cannot call getExprOperand for typeid(type)");
668 Stmt **begin =
reinterpret_cast<Stmt**
>(&Operand);
694 BaseExpr(baseExpr), TheDecl(decl),
695 MemberLoc(nameLoc), IsArrow(isArrow),
696 QualifierLoc(qualifierLoc) {}
709 else if (QualifierLoc)
745 enum { BASE_EXPR, IDX_EXPR, NUM_SUBEXPRS = 2 };
746 Stmt *SubExprs[NUM_SUBEXPRS];
749 void setBase(
Expr *
Base) { SubExprs[BASE_EXPR] = Base; }
750 void setIdx(
Expr *Idx) { SubExprs[IDX_EXPR] = Idx; }
758 RBracketLoc(RBracketLoc) {
759 SubExprs[BASE_EXPR] = Base;
760 SubExprs[IDX_EXPR] = Idx;
765 :
Expr(MSPropertySubscriptExprClass, Shell) {}
768 const Expr *
getBase()
const {
return cast<Expr>(SubExprs[BASE_EXPR]); }
771 const Expr *
getIdx()
const {
return cast<Expr>(SubExprs[IDX_EXPR]); }
786 return T->
getStmtClass() == MSPropertySubscriptExprClass;
791 return child_range(&SubExprs[0], &SubExprs[0] + NUM_SUBEXPRS);
801 llvm::PointerUnion<Stmt *, TypeSourceInfo *> Operand;
809 Operand->
getType()->isDependentType(),
810 Operand->
getType()->isInstantiationDependentType(),
812 Operand(Operand), UuidStr(UuidStr), Range(R) {}
818 Operand(Operand), UuidStr(UuidStr), Range(R) {}
821 :
Expr(CXXUuidofExprClass, Empty) {
823 Operand = (
Expr*)
nullptr;
836 assert(
isTypeOperand() &&
"Cannot call getTypeOperand for __uuidof(expr)");
841 assert(
isTypeOperand() &&
"Cannot call getTypeOperand for __uuidof(expr)");
846 assert(!
isTypeOperand() &&
"Cannot call getExprOperand for __uuidof(type)");
847 return static_cast<Expr*
>(Operand.get<
Stmt *>());
851 assert(!
isTypeOperand() &&
"Cannot call getExprOperand for __uuidof(type)");
871 Stmt **begin =
reinterpret_cast<Stmt**
>(&Operand);
897 Type->isDependentType(), Type->isDependentType(),
898 Type->isInstantiationDependentType(),
900 Loc(L), Implicit(isImplicit) { }
932 unsigned IsThrownVariableInScope : 1;
941 bool IsThrownVariableInScope) :
945 Op(expr), ThrowLoc(l), IsThrownVariableInScope(IsThrownVariableInScope) {}
996 Param(param), Loc(Loc) { }
1108 : Destructor(destructor) { }
1140 :
Expr(CXXBindTemporaryExprClass, SubExpr->
getType(),
1145 Temp(temp), SubExpr(SubExpr) { }
1149 :
Expr(CXXBindTemporaryExprClass, Empty), Temp(nullptr), SubExpr(nullptr) {}
1191 unsigned NumArgs : 16;
1192 unsigned Elidable : 1;
1193 unsigned HadMultipleCandidates : 1;
1194 unsigned ListInitialization : 1;
1195 unsigned StdInitListInitialization : 1;
1196 unsigned ZeroInitialization : 1;
1197 unsigned ConstructKind : 2;
1205 CXXConstructorDecl *Ctor,
1207 ArrayRef<Expr *> Args,
1208 bool HadMultipleCandidates,
1209 bool ListInitialization,
1210 bool StdInitListInitialization,
1211 bool ZeroInitialization,
1213 SourceRange ParenOrBraceRange);
1217 :
Expr(SC, Empty), Constructor(nullptr), NumArgs(0), Elidable(
false),
1218 HadMultipleCandidates(
false), ListInitialization(
false),
1219 ZeroInitialization(
false), ConstructKind(0), Args(nullptr)
1232 bool HadMultipleCandidates,
1233 bool ListInitialization,
1234 bool StdInitListInitialization,
1235 bool ZeroInitialization,
1269 ZeroInitialization = ZeroInit;
1304 assert(Arg < NumArgs &&
"Arg access out of range!");
1305 return cast<Expr>(Args[Arg]);
1308 assert(Arg < NumArgs &&
"Arg access out of range!");
1309 return cast<Expr>(Args[Arg]);
1314 assert(Arg < NumArgs &&
"Arg access out of range!");
1315 Args[Arg] = ArgExpr;
1348 unsigned ConstructsVirtualBase : 1;
1352 unsigned InheritedFromVirtualBase : 1;
1358 bool InheritedFromVirtualBase)
1361 Constructor(Ctor), Loc(Loc),
1362 ConstructsVirtualBase(ConstructsVirtualBase),
1363 InheritedFromVirtualBase(InheritedFromVirtualBase) {
1369 :
Expr(CXXInheritedCtorInitExprClass, Empty), Constructor(nullptr),
1370 ConstructsVirtualBase(
false), InheritedFromVirtualBase(
false) {}
1394 return T->
getStmtClass() == CXXInheritedCtorInitExprClass;
1421 castExpr, pathSize, writtenTy),
1422 LParenLoc(lParenLoc), RParenLoc(rParenLoc) {}
1447 return T->getStmtClass() == CXXFunctionalCastExprClass;
1479 bool HadMultipleCandidates,
1480 bool ListInitialization,
1481 bool StdInitListInitialization,
1482 bool ZeroInitialization);
1492 return T->getStmtClass() == CXXTemporaryObjectExprClass;
1528 unsigned NumCaptures : 16;
1532 unsigned CaptureDefault : 2;
1536 unsigned ExplicitParams : 1;
1539 unsigned ExplicitResultType : 1;
1555 bool ExplicitParams,
bool ExplicitResultType,
1557 bool ContainsUnexpandedParameterPack);
1561 :
Expr(LambdaExprClass, Empty),
1562 NumCaptures(NumCaptures), CaptureDefault(
LCD_None), ExplicitParams(
false),
1563 ExplicitResultType(
false) {
1564 getStoredStmts()[NumCaptures] =
nullptr;
1567 Stmt **getStoredStmts() {
return getTrailingObjects<Stmt *>(); }
1569 Stmt *
const *getStoredStmts()
const {
return getTrailingObjects<Stmt *>(); }
1578 SourceLocation ClosingBrace,
bool ContainsUnexpandedParameterPack);
1583 unsigned NumCaptures);
1592 return CaptureDefaultLoc;
1661 return reinterpret_cast<Expr **
>(getStoredStmts());
1667 return reinterpret_cast<Expr *
const *
>(getStoredStmts());
1730 return child_range(getStoredStmts(), getStoredStmts() + NumCaptures + 1);
1752 false,
false, Type->isInstantiationDependentType(),
1754 RParenLoc(rParenLoc), TypeInfo(TypeInfo) {}
1757 :
Expr(CXXScalarValueInitExprClass, Shell) { }
1769 return T->
getStmtClass() == CXXScalarValueInitExprClass;
1804 unsigned GlobalNew : 1;
1808 unsigned PassAlignment : 1;
1811 unsigned UsualArrayDeleteWantsSize : 1;
1813 unsigned NumPlacementArgs : 26;
1817 unsigned StoredInitializationStyle : 2;
1836 :
Expr(CXXNewExprClass, Shell), SubExprs(nullptr) { }
1842 assert(
getType()->isPointerType());
1847 return AllocatedTypeInfo;
1874 return Array ? cast<Expr>(SubExprs[0]) :
nullptr;
1877 return Array ? cast<Expr>(SubExprs[0]) :
nullptr;
1886 assert(i < NumPlacementArgs &&
"Index out of range");
1890 assert(i < NumPlacementArgs &&
"Index out of range");
1904 if (StoredInitializationStyle == 0)
1925 return PassAlignment;
1932 return UsualArrayDeleteWantsSize;
2000 bool GlobalDelete : 1;
2006 bool ArrayFormAsWritten : 1;
2009 bool UsualArrayDeleteWantsSize : 1;
2012 bool arrayFormAsWritten,
bool usualArrayDeleteWantsSize,
2017 OperatorDelete(operatorDelete), Argument(arg), Loc(loc),
2018 GlobalDelete(globalDelete),
2019 ArrayForm(arrayForm), ArrayFormAsWritten(arrayFormAsWritten),
2020 UsualArrayDeleteWantsSize(usualArrayDeleteWantsSize) { }
2022 :
Expr(CXXDeleteExprClass, Shell), OperatorDelete(nullptr),
2023 Argument(nullptr) {}
2034 return UsualArrayDeleteWantsSize;
2065 llvm::PointerUnion<TypeSourceInfo *, IdentifierInfo *>
Type;
2074 :
Type(II), Location(Loc) { }
2154 :
Expr(CXXPseudoDestructorExprClass, Shell),
2155 Base(nullptr), IsArrow(
false), QualifierLoc(), ScopeType(nullptr) { }
2241 return T->getStmtClass() == CXXPseudoDestructorExprClass;
2275 size_t numTrailingObjects(OverloadToken<TypeSourceInfo *>)
const {
2305 assert(I <
getNumArgs() &&
"Argument out-of-range");
2311 return llvm::makeArrayRef(getTrailingObjects<TypeSourceInfo *>(),
2341 virtual void anchor();
2367 (queried->
getType()->isInstantiationDependentType() ||
2370 ATT(att),
Value(value), Dimension(dimension),
2371 Loc(loc), RParen(rparen), QueriedType(queried) { }
2425 Expr* QueriedExpression;
2428 Expr *queried,
bool value,
2436 ET(et),
Value(value), Loc(loc), RParen(rparen),
2437 QueriedExpression(queried) { }
2441 QueriedExpression() { }
2479 unsigned NumResults;
2505 bool KnownDependent,
2506 bool KnownInstantiationDependent,
2507 bool KnownContainsUnexpandedParameterPack);
2510 :
Expr(K, Empty), QualifierLoc(), Results(nullptr), NumResults(0),
2535 if (isa<UnaryOperator>(E)) {
2536 assert(cast<UnaryOperator>(E)->
getOpcode() == UO_AddrOf);
2537 E = cast<UnaryOperator>(
E)->getSubExpr();
2540 Result.HasFormOfMemberPointer = (E == Ovl && Ovl->
getQualifier());
2541 Result.IsAddressOfOperand =
true;
2542 Result.Expression = Ovl;
2544 Result.HasFormOfMemberPointer =
false;
2545 Result.IsAddressOfOperand =
false;
2546 Result.Expression = cast<OverloadExpr>(
E);
2560 llvm::iterator_range<decls_iterator>
decls()
const {
2636 return T->
getStmtClass() == UnresolvedLookupExprClass ||
2658 UnresolvedLookupExpr, ASTTemplateKWAndArgsInfo, TemplateArgumentLoc> {
2675 size_t numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
2684 bool RequiresADL,
bool Overloaded,
2687 :
OverloadExpr(UnresolvedLookupExprClass, C, QualifierLoc, TemplateKWLoc,
2688 NameInfo, TemplateArgs, Begin, End,
false,
false,
false),
2689 RequiresADL(RequiresADL),
2690 Overloaded(Overloaded), NamingClass(NamingClass)
2695 RequiresADL(
false), Overloaded(
false), NamingClass(
nullptr)
2698 friend TrailingObjects;
2707 bool ADL,
bool Overloaded,
2712 ADL, Overloaded,
nullptr,
Begin,
End);
2727 unsigned NumTemplateArgs);
2743 return l.getBeginLoc();
2778 ASTTemplateKWAndArgsInfo,
2779 TemplateArgumentLoc> {
2789 bool HasTemplateKWAndArgsInfo;
2791 size_t numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
2792 return HasTemplateKWAndArgsInfo ? 1 : 0;
2809 bool HasTemplateKWAndArgsInfo,
2810 unsigned NumTemplateArgs);
2837 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->TemplateKWLoc;
2844 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->LAngleLoc;
2851 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->RAngleLoc;
2864 getTrailingObjects<ASTTemplateKWAndArgsInfo>()->copyInto(
2865 getTrailingObjects<TemplateArgumentLoc>(), List);
2872 return getTrailingObjects<TemplateArgumentLoc>();
2879 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->NumTemplateArgs;
2898 return T->
getStmtClass() == DependentScopeDeclRefExprClass;
2937 friend TrailingObjects;
2942 unsigned numObjects);
2945 bool CleanupsHaveSideEffects,
2949 return llvm::makeArrayRef(getTrailingObjects<CleanupObject>(),
3026 :
Expr(CXXUnresolvedConstructExprClass, Empty), Type(), NumArgs(NumArgs) { }
3028 friend TrailingObjects;
3073 assert(I < NumArgs &&
"Argument index out-of-range");
3078 assert(I < NumArgs &&
"Argument index out-of-range");
3083 assert(I < NumArgs &&
"Argument index out-of-range");
3089 if (!RParenLoc.
isValid() && NumArgs > 0)
3095 return T->
getStmtClass() == CXXUnresolvedConstructExprClass;
3115 ASTTemplateKWAndArgsInfo,
3116 TemplateArgumentLoc> {
3131 bool HasTemplateKWAndArgsInfo : 1;
3154 size_t numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
3155 return HasTemplateKWAndArgsInfo ? 1 : 0;
3184 unsigned NumTemplateArgs);
3195 return cast<Expr>(Base);
3230 return FirstQualifierFoundInScope;
3236 return MemberNameInfo;
3251 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->TemplateKWLoc;
3258 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->LAngleLoc;
3265 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->RAngleLoc;
3279 getTrailingObjects<ASTTemplateKWAndArgsInfo>()->copyInto(
3280 getTrailingObjects<TemplateArgumentLoc>(), List);
3289 return getTrailingObjects<TemplateArgumentLoc>();
3298 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->NumTemplateArgs;
3320 return T->
getStmtClass() == CXXDependentScopeMemberExprClass;
3353 UnresolvedMemberExpr, ASTTemplateKWAndArgsInfo, TemplateArgumentLoc> {
3360 bool HasUnresolvedUsing : 1;
3374 size_t numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
3388 :
OverloadExpr(UnresolvedMemberExprClass, Empty), IsArrow(
false),
3389 HasUnresolvedUsing(
false), Base(
nullptr) { }
3391 friend TrailingObjects;
3408 unsigned NumTemplateArgs);
3420 return cast<Expr>(Base);
3424 return cast<Expr>(Base);
3463 return l.getBeginLoc();
3484 inline ASTTemplateKWAndArgsInfo *
3489 if (isa<UnresolvedLookupExpr>(
this))
3490 return cast<UnresolvedLookupExpr>(
this)
3491 ->getTrailingObjects<ASTTemplateKWAndArgsInfo>();
3493 return cast<UnresolvedMemberExpr>(
this)
3494 ->getTrailingObjects<ASTTemplateKWAndArgsInfo>();
3498 if (isa<UnresolvedLookupExpr>(
this))
3499 return cast<UnresolvedLookupExpr>(
this)
3500 ->getTrailingObjects<TemplateArgumentLoc>();
3502 return cast<UnresolvedMemberExpr>(
this)
3503 ->getTrailingObjects<TemplateArgumentLoc>();
3525 Value(Val ==
CT_Cannot), Operand(Operand), Range(Keyword, RParen)
3529 :
Expr(CXXNoexceptExprClass, Empty)
3573 unsigned NumExpansions;
3587 EllipsisLoc(EllipsisLoc),
3588 NumExpansions(NumExpansions? *NumExpansions + 1 : 0),
3589 Pattern(Pattern) { }
3607 return NumExpansions - 1;
3664 friend TrailingObjects;
3677 OperatorLoc(OperatorLoc), PackLoc(PackLoc), RParenLoc(RParenLoc),
3678 Length(Length ? *Length : PartialArgs.size()), Pack(Pack) {
3679 assert((!Length || PartialArgs.empty()) &&
3680 "have partial args for non-dependent sizeof... expression");
3682 std::uninitialized_copy(PartialArgs.begin(), PartialArgs.end(), Args);
3687 :
Expr(SizeOfPackExprClass, Empty), Length(NumPartialArgs), Pack() {}
3690 static SizeOfPackExpr *
Create(ASTContext &
Context, SourceLocation OperatorLoc,
3691 NamedDecl *Pack, SourceLocation PackLoc,
3692 SourceLocation RParenLoc,
3693 Optional<unsigned> Length =
None,
3694 ArrayRef<TemplateArgument> PartialArgs =
None);
3696 unsigned NumPartialArgs);
3716 "Cannot get the length of a value-dependent pack size expression");
3733 return llvm::makeArrayRef(Args, Args + Length);
3764 :
Expr(SubstNonTypeTemplateParmExprClass, Empty) { }
3772 :
Expr(SubstNonTypeTemplateParmExprClass, type, valueKind,
OK_Ordinary,
3776 Param(param),
Replacement(replacement), NameLoc(loc) {}
3787 return s->
getStmtClass() == SubstNonTypeTemplateParmExprClass;
3815 unsigned NumArguments;
3823 :
Expr(SubstNonTypeTemplateParmPackExprClass, Empty) { }
3845 return T->
getStmtClass() == SubstNonTypeTemplateParmPackExprClass;
3878 unsigned NumParameters;
3884 friend TrailingObjects;
3894 unsigned NumParams);
3957 unsigned ManglingNumber;
3959 llvm::PointerUnion<Stmt *, ExtraState *> State;
3964 void initializeExtraState(
const ValueDecl *ExtendedBy,
3965 unsigned ManglingNumber);
3969 bool BoundToLvalueReference)
3970 :
Expr(MaterializeTemporaryExprClass, T,
3978 :
Expr(MaterializeTemporaryExprClass, Empty) { }
3982 :
State.get<ExtraState *>()->Temporary;
3996 if (isa<FieldDecl>(ExtendingDecl))
4000 if (isa<BindingDecl>(ExtendingDecl))
4011 :
State.get<ExtraState *>()->ExtendingDecl;
4017 return State.is<
Stmt *>() ? 0 :
State.get<ExtraState *>()->ManglingNumber;
4034 return T->
getStmtClass() == MaterializeTemporaryExprClass;
4042 auto ES =
State.get<ExtraState *>();
4043 return child_range(&ES->Temporary, &ES->Temporary + 1);
4071 LParenLoc(LParenLoc), EllipsisLoc(EllipsisLoc), RParenLoc(RParenLoc),
4126 enum SubExpr { Common, Ready, Suspend, Resume, Count };
4127 Stmt *SubExprs[SubExpr::Count];
4139 KeywordLoc(KeywordLoc), OpaqueValue(OpaqueValue) {
4140 SubExprs[SubExpr::Common] = Common;
4141 SubExprs[SubExpr::Ready] = Ready;
4142 SubExprs[SubExpr::Suspend] = Suspend;
4143 SubExprs[SubExpr::Resume] = Resume;
4149 KeywordLoc(KeywordLoc) {
4151 "wrong constructor for non-dependent co_await/co_yield expression");
4152 SubExprs[SubExpr::Common] = Common;
4153 SubExprs[SubExpr::Ready] =
nullptr;
4154 SubExprs[SubExpr::Suspend] =
nullptr;
4155 SubExprs[SubExpr::Resume] =
nullptr;
4158 SubExprs[SubExpr::Common] =
nullptr;
4159 SubExprs[SubExpr::Ready] =
nullptr;
4160 SubExprs[SubExpr::Suspend] =
nullptr;
4161 SubExprs[SubExpr::Resume] =
nullptr;
4166 return static_cast<Expr*
>(SubExprs[SubExpr::Common]);
4172 return static_cast<Expr*
>(SubExprs[SubExpr::Ready]);
4175 return static_cast<Expr*
>(SubExprs[SubExpr::Suspend]);
4178 return static_cast<Expr*
>(SubExprs[SubExpr::Resume]);
4189 return child_range(SubExprs, SubExprs + SubExpr::Count);
4204 bool IsImplicit =
false)
4206 Suspend, Resume, OpaqueValue) {
4210 bool IsImplicit =
false)
4245 KeywordLoc(KeywordLoc) {
4249 "wrong constructor for non-dependent co_await/co_yield expression");
4251 SubExprs[1] = OpCoawait;
4255 :
Expr(DependentCoawaitExprClass, Empty) {}
4259 return cast<UnresolvedLookupExpr>(SubExprs[1]);
4282 Suspend, Resume, OpaqueValue) {}
CXXUuidofExpr(QualType Ty, TypeSourceInfo *Operand, StringRef UuidStr, SourceRange R)
SourceLocation getLocStart() const LLVM_READONLY
CoroutineSuspendExpr(StmtClass SC, SourceLocation KeywordLoc, Expr *Common, Expr *Ready, Expr *Suspend, Expr *Resume, OpaqueValueExpr *OpaqueValue)
A call to an overloaded operator written using operator syntax.
Raw form: operator "" X (const char *)
SourceRange getParenOrBraceRange() const
MSPropertySubscriptExpr(EmptyShell Shell)
Create an empty array subscript expression.
void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const
Copies the template arguments into the given structure.
CXXDeleteExpr(EmptyShell Shell)
void setRParenLoc(SourceLocation L)
LiteralOperatorKind
The kind of literal operator which is invoked.
operator "" X (long double)
DeclarationName getMember() const
Retrieve the name of the member that this expression refers to.
SourceLocation getEnd() const
ParmVarDecl *const * iterator
Iterators over the parameters which the parameter pack expanded into.
StmtClass getStmtClass() const
CXXConstructExpr::ConstructionKind getConstructionKind() const
The null pointer literal (C++11 [lex.nullptr])
ExprObjectKind getObjectKind() const
getObjectKind - The object kind that this expression produces.
FunctionDecl - An instance of this class is created to represent a function declaration or definition...
Represents a 'co_await' expression while the type of the promise is dependent.
TypeSourceInfo * getDestroyedTypeInfo() const
Retrieve the source location information for the type being destroyed.
unsigned arg_size() const
Retrieve the number of arguments.
const internal::VariadicDynCastAllOfMatcher< Stmt, Expr > expr
Matches expressions.
void setPreArg(unsigned i, Stmt *PreArg)
bool allowFPContractWithinStatement() const
SourceRange getSourceRange() const LLVM_READONLY
bool isImplicitAccess() const
static bool classof(const Stmt *T)
bool hasExplicitResultType() const
Whether this lambda had its result type explicitly specified.
CoawaitExpr(SourceLocation CoawaitLoc, QualType Ty, Expr *Operand, bool IsImplicit=false)
PointerType - C99 6.7.5.1 - Pointer Declarators.
llvm::iterator_range< arg_iterator > placement_arguments()
Stores the type being destroyed by a pseudo-destructor expression.
A (possibly-)qualified type.
CXXBoolLiteralExpr(EmptyShell Empty)
bool hasExplicitTemplateArgs() const
Determines whether this expression had explicit template arguments.
FPOptions getFPFeatures() const
bool containsUnexpandedParameterPack() const
Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates)...
bool isRightFold() const
Does this produce a right-associated sequence of operators?
bool isSpecificBuiltinType(unsigned K) const
Test for a particular builtin type.
SourceLocation getLParenLoc() const
Retrieve the location of the left parentheses ('(') that precedes the argument list.
Expr * getArg(unsigned Arg)
getArg - Return the specified argument.
SourceLocation getOperatorLoc() const
Retrieve the location of the '->' or '.' operator.
SourceLocation getThrowLoc() const
ArrayRef< TemplateArgumentLoc > template_arguments() const
Defines enumerations for the type traits support.
void setLocation(SourceLocation L)
bool isElidable() const
Whether this construction is elidable.
Expr(StmtClass SC, QualType T, ExprValueKind VK, ExprObjectKind OK, bool TD, bool VD, bool ID, bool ContainsUnexpandedParameterPack)
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getLocEnd() const LLVM_READONLY
llvm::iterator_range< const_arg_iterator > arg_const_range
CoawaitExpr(EmptyShell Empty)
const Expr * getArg(unsigned Arg) const
static CXXDependentScopeMemberExpr * Create(const ASTContext &C, Expr *Base, QualType BaseType, bool IsArrow, SourceLocation OperatorLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierFoundInScope, DeclarationNameInfo MemberNameInfo, const TemplateArgumentListInfo *TemplateArgs)
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
SourceLocation TemplateKWLoc
The source location of the template keyword; this is used as part of the representation of qualified ...
CXXDeleteExpr(QualType ty, bool globalDelete, bool arrayForm, bool arrayFormAsWritten, bool usualArrayDeleteWantsSize, FunctionDecl *operatorDelete, Expr *arg, SourceLocation loc)
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the member name, with source location information...
static UnresolvedLookupExpr * Create(const ASTContext &C, CXXRecordDecl *NamingClass, NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo, bool ADL, bool Overloaded, UnresolvedSetIterator Begin, UnresolvedSetIterator End)
Stmt - This represents one statement.
TypeSourceInfo * getScopeTypeInfo() const
Retrieve the scope type in a qualified pseudo-destructor expression.
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getEndLoc() const
getEndLoc - Retrieve the location of the last token.
SourceLocation getPackLoc() const
Determine the location of the parameter pack.
Expr * getResumeExpr() const
static CXXDynamicCastExpr * Create(const ASTContext &Context, QualType T, ExprValueKind VK, CastKind Kind, Expr *Op, const CXXCastPath *Path, TypeSourceInfo *Written, SourceLocation L, SourceLocation RParenLoc, SourceRange AngleBrackets)
bool isGlobalDelete() const
static bool classof(const Stmt *T)
Expr * GetTemporaryExpr() const
Retrieve the temporary-generating subexpression whose value will be materialized into a glvalue...
bool hasQualifier() const
Evalutes true when this nested-name-specifier location is empty.
SourceLocation getLocStart() const LLVM_READONLY
Expr * getOperand() const
ConstExprIterator const_arg_iterator
SourceRange getTypeIdParens() const
ArrayRef< TypeSourceInfo * > getArgs() const
Retrieve the argument types.
unsigned getPackLength() const
Retrieve the length of the parameter pack.
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getLocStart() const LLVM_READONLY
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
const_arg_iterator arg_end() const
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
capture_range captures() const
Retrieve this lambda's captures.
bool isBoundToLvalueReference() const
Determine whether this materialized temporary is bound to an lvalue reference; otherwise, it's bound to an rvalue reference.
TypeSourceInfo * getArg(unsigned I) const
Retrieve the Ith argument.
SourceLocation getLocEnd() const LLVM_READONLY
The base class of the type hierarchy.
static bool classof(const Stmt *T)
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
Represents a call to a C++ constructor.
bool hasExplicitTemplateArgs() const
Determines whether this lookup had explicit template arguments.
TypeSourceInfo * getTypeSourceInfo() const
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent...
static bool classof(const Stmt *S)
Expr * getOperand() const
A container of type source information.
StorageDuration
The storage duration for an object (per C++ [basic.stc]).
Floating point control options.
MS property subscript expression.
SourceLocation getLocStart() const LLVM_READONLY
static CXXFunctionalCastExpr * Create(const ASTContext &Context, QualType T, ExprValueKind VK, TypeSourceInfo *Written, CastKind Kind, Expr *Op, const CXXCastPath *Path, SourceLocation LPLoc, SourceLocation RPLoc)
static bool classof(const Stmt *T)
void setLocation(SourceLocation Loc)
Describes the capture of a variable or of this, or of a C++1y init-capture.
Represents a C++ constructor within a class.
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
unsigned getNumTemplateArgs() const
SourceLocation getLocEnd() const LLVM_READONLY
Expr * getInClassInitializer() const
getInClassInitializer - Get the C++11 in-class initializer for this member, or null if one has not be...
capture_iterator capture_begin() const
Retrieve an iterator pointing to the first lambda capture.
const CXXTemporary * getTemporary() const
void setRParenLoc(SourceLocation L)
SourceLocation getKeywordLoc() const
SourceLocation getLocStart() const LLVM_READONLY
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
SourceLocation getLocStart() const LLVM_READONLY
static CXXConstructExpr * Create(const ASTContext &C, QualType T, SourceLocation Loc, CXXConstructorDecl *Ctor, bool Elidable, ArrayRef< Expr * > Args, bool HadMultipleCandidates, bool ListInitialization, bool StdInitListInitialization, bool ZeroInitialization, ConstructionKind ConstructKind, SourceRange ParenOrBraceRange)
Expr *const * const_capture_init_iterator
Const iterator that walks over the capture initialization arguments.
SourceRange getSourceRange() const LLVM_READONLY
Expr * getOperand() const
ArrayRef< TemplateArgument > getPartialArguments() const
Get.
SourceRange getSourceRange() const LLVM_READONLY
const Expr * getCallee() const
SourceLocation getLocEnd() const LLVM_READONLY
static FunctionParmPackExpr * CreateEmpty(const ASTContext &Context, unsigned NumParams)
static DependentScopeDeclRefExpr * CreateEmpty(const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
const Expr * getArg(unsigned I) const
SourceLocation getLocation() const
Retrieve the location of the name within the expression.
bool hasExplicitParameters() const
Determine whether this lambda has an explicit parameter list vs.
static bool classof(const Stmt *T)
CXXNewExpr(const ASTContext &C, bool globalNew, FunctionDecl *operatorNew, FunctionDecl *operatorDelete, bool PassAlignment, bool usualArrayDeleteWantsSize, ArrayRef< Expr * > placementArgs, SourceRange typeIdParens, Expr *arraySize, InitializationStyle initializationStyle, Expr *initializer, QualType ty, TypeSourceInfo *AllocatedTypeInfo, SourceRange Range, SourceRange directInitRange)
bool hasTemplateKeyword() const
Determines whether the member name was preceded by the template keyword.
friend class OverloadExpr
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
static bool classof(const Stmt *T)
Stores a list of template parameters for a TemplateDecl and its derived classes.
SourceLocation getOperatorLoc() const
Returns the location of the operator symbol in the expression.
void setContainsUnexpandedParameterPack(bool PP=true)
Set the bit that describes whether this expression contains an unexpanded parameter pack...
static bool classof(const Stmt *T)
SourceLocation getLocStart() const LLVM_READONLY
const ParmVarDecl * getParam() const
raw_arg_iterator raw_arg_begin()
void initializeResults(const ASTContext &C, UnresolvedSetIterator Begin, UnresolvedSetIterator End)
A C++ throw-expression (C++ [except.throw]).
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
ParmVarDecl - Represents a parameter to a function.
QualType getBaseType() const
CXXDefaultArgExpr(EmptyShell Empty)
ArrayTypeTrait getTrait() const
void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const
Copies the template arguments (if present) into the given structure.
TypeSourceInfo * getTypeSourceInfo() const
Retrieve the type source information for the type being constructed.
SourceLocation getDestroyedTypeLoc() const
Retrieve the starting location of the type being destroyed.
CoawaitExprBitfields CoawaitBits
A C++ static_cast expression (C++ [expr.static.cast]).
SourceLocation getLocEnd() const LLVM_READONLY
static CXXUnresolvedConstructExpr * Create(const ASTContext &C, TypeSourceInfo *Type, SourceLocation LParenLoc, ArrayRef< Expr * > Args, SourceLocation RParenLoc)
UserDefinedLiteral(const ASTContext &C, Expr *Fn, ArrayRef< Expr * > Args, QualType T, ExprValueKind VK, SourceLocation LitEndLoc, SourceLocation SuffixLoc)
void AllocateArgsArray(const ASTContext &C, bool isArray, unsigned numPlaceArgs, bool hasInitializer)
CXXConstructExpr(StmtClass SC, EmptyShell Empty)
Construct an empty C++ construction expression.
CXXOperatorCallExpr(ASTContext &C, OverloadedOperatorKind Op, Expr *fn, ArrayRef< Expr * > args, QualType t, ExprValueKind VK, SourceLocation operatorloc, FPOptions FPFeatures)
SourceLocation getLocEnd() const LLVM_READONLY
bool isInfixBinaryOp() const
Is this written as an infix binary operator?
SourceLocation getLocEnd() const LLVM_READONLY
DeclarationName getMemberName() const
Retrieve the name of the member that this expression refers to.
SourceLocation getLocEnd() const LLVM_READONLY
DeclarationName getName() const
getName - Returns the embedded declaration name.
One of these records is kept for each identifier that is lexed.
SourceLocation getLocEnd() const LLVM_READONLY
void setExprOperand(Expr *E)
ExpressionTraitExpr(SourceLocation loc, ExpressionTrait et, Expr *queried, bool value, SourceLocation rparen, QualType resultType)
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
A C++ nested-name-specifier augmented with source location information.
static bool classof(const Stmt *T)
SourceLocation getStartLoc() const
LambdaCaptureDefault getCaptureDefault() const
Determine the default capture kind for this lambda.
const_capture_init_iterator capture_init_begin() const
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
static bool classof(const Stmt *T)
SourceLocation getLocStart() const LLVM_READONLY
bool isImplicitCXXThis() const
Whether this expression is an implicit reference to 'this' in C++.
FieldDecl - An instance of this class is created by Sema::ActOnField to represent a member of a struc...
OpaqueValueExpr * getOpaqueValue() const
getOpaqueValue - Return the opaque value placeholder.
CXXRecordDecl * getNamingClass() const
Gets the naming class of this lookup, if any.
Expr * getBase()
Retrieve the base object of this member expressions, e.g., the x in x.m.
static bool classof(const Stmt *T)
SourceLocation getLocStart() const LLVM_READONLY
unsigned getManglingNumber() const
const_arg_iterator placement_arg_begin() const
const Expr *const * const_arg_iterator
SourceLocation getLocStart() const LLVM_READONLY
Expr * getImplicitObjectArgument() const
Retrieves the implicit object argument for the member call.
void setRequiresZeroInitialization(bool ZeroInit)
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
void setArg(unsigned I, Expr *E)
SourceLocation getLocEnd() const LLVM_READONLY
The iterator over UnresolvedSets.
TypeSourceInfo * getTypeSourceInfo() const
bool isPotentiallyEvaluated() const
Determine whether this typeid has a type operand which is potentially evaluated, per C++11 [expr...
CXXMethodDecl * getCallOperator() const
Retrieve the function call operator associated with this lambda expression.
Expr * getPlacementArg(unsigned i)
Expr * getArg(unsigned I)
Represents a C++ member access expression for which lookup produced a set of overloaded functions...
const DeclarationNameInfo & getNameInfo() const
Gets the full name info.
CXXScalarValueInitExpr(QualType Type, TypeSourceInfo *TypeInfo, SourceLocation rParenLoc)
Create an explicitly-written scalar-value initialization expression.
CXXInheritedCtorInitExpr(EmptyShell Empty)
Construct an empty C++ inheriting construction expression.
CUDAKernelCallExpr(ASTContext &C, Expr *fn, CallExpr *Config, ArrayRef< Expr * > args, QualType t, ExprValueKind VK, SourceLocation RP)
QualType getQueriedType() const
SourceLocation getLocStart() const LLVM_READONLY
static bool classof(const Stmt *T)
CXXUuidofExpr(QualType Ty, Expr *Operand, StringRef UuidStr, SourceRange R)
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getRParenLoc() const
SourceLocation getLocEnd() const LLVM_READONLY
An r-value expression (a pr-value in the C++11 taxonomy) produces a temporary value.
void setDestroyedType(TypeSourceInfo *Info)
Set the destroyed type.
bool isOverloaded() const
True if this lookup is overloaded.
bool isFPContractableWithinStatement() const
SubstNonTypeTemplateParmExpr(QualType type, ExprValueKind valueKind, SourceLocation loc, NonTypeTemplateParmDecl *param, Expr *replacement)
const Expr * getArgument() const
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
bool isGenericLambda() const
Whether this is a generic lambda.
bool isAlwaysNull() const
isAlwaysNull - Return whether the result of the dynamic_cast is proven to always be null...
SourceLocation getLocStart() const LLVM_READONLY
MSPropertyRefExpr(Expr *baseExpr, MSPropertyDecl *decl, bool isArrow, QualType ty, ExprValueKind VK, NestedNameSpecifierLoc qualifierLoc, SourceLocation nameLoc)
CXXThisExpr(SourceLocation L, QualType Type, bool isImplicit)
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getLocStart() const LLVM_READONLY
void setOperatorNew(FunctionDecl *D)
IdentifierInfo * getIdentifier() const
void setLocation(SourceLocation L)
IdentifierInfo * getDestroyedTypeIdentifier() const
In a dependent pseudo-destructor expression for which we do not have full type information on the des...
static bool classof(const Stmt *T)
bool HasFormOfMemberPointer
A convenient class for passing around template argument information.
PseudoDestructorTypeStorage(IdentifierInfo *II, SourceLocation Loc)
const ValueDecl * getExtendingDecl() const
Get the declaration which triggered the lifetime-extension of this temporary, if any.
const_arg_iterator placement_arg_end() const
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
Expr * getInitializer()
The initializer of this new-expression.
An x-value expression is a reference to an object with independent storage but which can be "moved"...
Expr * getExprOperand() const
ArrayRef< TemplateArgumentLoc > template_arguments() const
SourceLocation getLocStart() const LLVM_READONLY
static bool classof(const Stmt *T)
CXXFoldExpr(QualType T, SourceLocation LParenLoc, Expr *LHS, BinaryOperatorKind Opcode, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc)
const DeclarationNameInfo & getMemberNameInfo() const
Retrieve the full name info for the member that this expression refers to.
ParmVarDecl * getExpansion(unsigned I) const
Get an expansion of the parameter pack by index.
capture_iterator capture_end() const
Retrieve an iterator pointing past the end of the sequence of lambda captures.
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding the member name, if any.
SourceLocation getLocation() const
InitializationStyle getInitializationStyle() const
The kind of initializer this new-expression has.
bool isValueDependent() const
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding this name, if any.
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies this declaration.
static bool classof(const Stmt *T)
SourceLocation getEndLoc() const
SourceLocation getLocStart() const LLVM_READONLY
Expr * getBaseExpr() const
New-expression has a C++98 paren-delimited initializer.
SourceLocation getLocEnd() const LLVM_READONLY
void setListInitialization(bool V)
TypeSourceInfo * getTypeSourceInfo() const
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
FieldDecl * getField()
Get the field whose initializer will be used.
CXXStdInitializerListExpr(QualType Ty, Expr *SubExpr)
QualType getDestroyedType() const
Retrieve the type being destroyed.
Represents binding an expression to a temporary.
const Expr *const * getArgs() const
CompoundStmt * getBody() const
Retrieve the body of the lambda.
void setDestroyedType(IdentifierInfo *II, SourceLocation Loc)
Set the name of destroyed type for a dependent pseudo-destructor expression.
ArrayTypeTrait
Names for the array type traits.
CXXTemporary * getTemporary()
static bool classof(const Stmt *T)
SourceLocation getLocStart() const LLVM_READONLY
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
QualType getTypeOperand(ASTContext &Context) const
Retrieves the type operand of this __uuidof() expression after various required adjustments (removing...
SourceLocation getLocEnd() const LLVM_READONLY
An ordinary object is located at an address in memory.
Represents a C++ member access expression where the actual member referenced could not be resolved be...
CleanupObject getObject(unsigned i) const
bool isArrow() const
Determine whether this pseudo-destructor expression was written using an '->' (otherwise, it used a '.
capture_iterator implicit_capture_end() const
Retrieve an iterator pointing past the end of the sequence of implicit lambda captures.
CXXBindTemporaryExpr(EmptyShell Empty)
detail::InMemoryDirectory::const_iterator I
llvm::iterator_range< const_capture_init_iterator > capture_inits() const
Retrieve the initialization expressions for this lambda's captures.
SourceLocation getUsedLocation() const
Retrieve the location where this default argument was actually used.
SourceLocation getLocStart() const
A default argument (C++ [dcl.fct.default]).
ExpressionTrait getTrait() const
void setSourceRange(SourceRange R)
arg_iterator placement_arg_end()
Iterator for iterating over Stmt * arrays that contain only Expr *.
CoyieldExpr(SourceLocation CoyieldLoc, Expr *Operand, Expr *Ready, Expr *Suspend, Expr *Resume, OpaqueValueExpr *OpaqueValue)
Represents the this expression in C++.
bool hadMultipleCandidates() const
Whether the referred constructor was resolved from an overloaded set having size greater than 1...
MSPropertyDecl * getPropertyDecl() const
New-expression has no initializer as written.
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
SourceLocation getKeywordLoc() const
SourceLocation getLoc() const
getLoc - Returns the main location of the declaration name.
TypeTrait
Names for traits that operate specifically on types.
SourceLocation getCaptureDefaultLoc() const
Retrieve the location of this lambda's capture-default, if any.
Optional< unsigned > getNumExpansions() const
Determine the number of expansions that will be produced when this pack expansion is instantiated...
QualType getTypeAsWritten() const
Retrieve the type that is being constructed, as specified in the source code.
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding this name, if any.
const Expr * getBase() const
SourceLocation getLocation() const
FunctionDecl * getOperatorDelete() const
UserDefinedLiteral(const ASTContext &C, EmptyShell Empty)
SourceLocation getColonColonLoc() const
Retrieve the location of the '::' in a qualified pseudo-destructor expression.
CXXScalarValueInitExpr(EmptyShell Shell)
unsigned getNumDecls() const
Gets the number of declarations in the unresolved set.
Const iterator for iterating over Stmt * arrays that contain only Expr *.
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
SourceLocation getMemberLoc() const
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
CompoundStmt - This represents a group of statements like { stmt stmt }.
void setFPFeatures(FPOptions F)
unsigned NumTemplateArgs
The number of template arguments in TemplateArgs.
static bool classof(const Stmt *T)
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the member name.
CXXTypeidExpr(QualType Ty, TypeSourceInfo *Operand, SourceRange R)
CXXMethodDecl * getMethodDecl() const
Retrieves the declaration of the called method.
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
ArrayTypeTraitExpr(EmptyShell Empty)
unsigned getNumObjects() const
llvm::iterator_range< decls_iterator > decls() const
CastKind
CastKind - The kind of operation required for a conversion.
SourceLocation getLocStart() const LLVM_READONLY
unsigned getNumExpansions() const
Get the number of parameters in this parameter pack.
static bool classof(const Stmt *T)
CXXTypeidExpr(QualType Ty, Expr *Operand, SourceRange R)
SourceLocation getLocEnd() const LLVM_READONLY
Expr * getQueriedExpression() const
NestedNameSpecifierLoc getQualifierLoc() const
Stmt * getPreArg(unsigned i)
static bool classof(const Stmt *T)
SourceLocation getLocStart() const LLVM_READONLY
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on a template...
const Expr * getExpr() const
Get the initialization expression that will be used.
static CXXDefaultArgExpr * Create(const ASTContext &C, SourceLocation Loc, ParmVarDecl *Param)
bool HasTemplateKWAndArgsInfo
Whether the name includes info for explicit template keyword and arguments.
FunctionDecl * getOperatorDelete() const
NamedDecl * getFirstQualifierFoundInScope() const
Retrieve the first part of the nested-name-specifier that was found in the scope of the member access...
SourceLocation getLocEnd() const LLVM_READONLY
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called...
PseudoDestructorTypeStorage()
SourceLocation getLocEnd() const LLVM_READONLY
void setOperatorDelete(FunctionDecl *D)
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type...
SourceLocation getLocEnd() const LLVM_READONLY
SourceRange getSourceRange() const LLVM_READONLY
BlockDecl - This represents a block literal declaration, which is like an unnamed FunctionDecl...
static bool classof(const Stmt *T)
bool isMutable() const
Determine whether the lambda is mutable, meaning that any captures values can be modified.
ValueDecl - Represent the declaration of a variable (in which case it is an lvalue) a function (in wh...
Expr - This represents one expression.
static bool classof(const Stmt *T)
SourceLocation getLocEnd() const LLVM_READONLY
void setIsImplicit(bool value=true)
SourceLocation getLocStart() const LLVM_READONLY
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
SourceLocation getLocEnd() const LLVM_READONLY
NestedNameSpecifierLoc getQualifierLoc() const
Fetches the nested-name qualifier with source-location information, if one was given.
decls_iterator decls_end() const
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getNameLoc() const
Gets the location of the name.
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
static FindResult find(Expr *E)
Finds the overloaded expression in the given expression E of OverloadTy.
const Expr * getSubExpr() const
StorageDuration getStorageDuration() const
Retrieve the storage duration for the materialized temporary.
Represents a C++ functional cast expression that builds a temporary object.
SourceLocation getMemberLoc() const
A C++ const_cast expression (C++ [expr.const.cast]).
SourceLocation getExprLoc() const LLVM_READONLY
void setTypeOperandSourceInfo(TypeSourceInfo *TSI)
Represents a C++ destructor within a class.
New-expression has a C++11 list-initializer.
SourceRange getSourceRange() const
const DeclarationNameInfo & getNameInfo() const
Retrieve the name that this expression refers to.
const Expr * getCookedLiteral() const
bool hasExplicitTemplateArgs() const
Determines whether this member expression actually had a C++ template argument list explicitly specif...
bool hasTemplateKeyword() const
Determines whether the name was preceded by the template keyword.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source location information.
raw_arg_iterator raw_arg_end()
static CXXStaticCastExpr * Create(const ASTContext &Context, QualType T, ExprValueKind VK, CastKind K, Expr *Op, const CXXCastPath *Path, TypeSourceInfo *Written, SourceLocation L, SourceLocation RParenLoc, SourceRange AngleBrackets)
SourceLocation getLocation() const
static CXXReinterpretCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
void setUuidStr(StringRef US)
DeclContext * getDeclContext()
ConstructionKind getConstructionKind() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
bool isImplicitAccess() const
True if this is an implicit access, i.e., one in which the member being accessed was not written in t...
static bool classof(const Stmt *T)
Represents an expression that computes the length of a parameter pack.
static bool classof(const Stmt *T)
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
ArrayTypeTraitExpr(SourceLocation loc, ArrayTypeTrait att, TypeSourceInfo *queried, uint64_t value, Expr *dimension, SourceLocation rparen, QualType ty)
static bool classof(const Stmt *s)
static DependentScopeDeclRefExpr * Create(const ASTContext &C, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
static bool classof(const Stmt *T)
SourceLocation getLocStart() const LLVM_READONLY
ExprWithCleanupsBitfields ExprWithCleanupsBits
CXXRecordDecl * getNamingClass() const
Retrieve the naming class of this lookup.
NonTypeTemplateParmDecl * getParameterPack() const
Retrieve the non-type template parameter pack being substituted.
SourceRange getAngleBrackets() const LLVM_READONLY
SourceLocation getLocEnd() const LLVM_READONLY
bool shouldNullCheckAllocation(const ASTContext &Ctx) const
True if the allocation result needs to be null-checked.
QualType getAllocatedType() const
SourceLocation getExprLoc() const LLVM_READONLY
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
SourceLocation getBeginLoc() const
getBeginLoc - Retrieve the location of the first token.
static bool classof(const Stmt *T)
bool isFunctionOrMethod() const
Stmt * getTemporary() const
Represents a folding of a pack over an operator.
static bool classof(const Stmt *T)
const Expr * getBase() const
StringRef getUuidStr() const
Expr * getDimensionExpression() const
SourceLocation getLocEnd() const LLVM_READONLY
A member reference to an MSPropertyDecl.
Represents a reference to a non-type template parameter that has been substituted with a template arg...
CXXMemberCallExpr(ASTContext &C, EmptyShell Empty)
NestedNameSpecifier * getQualifier() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name...
The result type of a method or function.
SourceRange getSourceRange() const LLVM_READONLY
capture_iterator implicit_capture_begin() const
Retrieve an iterator pointing to the first implicit lambda capture.
Expr * getReadyExpr() const
const_arg_iterator arg_begin() const
MSPropertyRefExpr(EmptyShell Empty)
CoyieldExpr(EmptyShell Empty)
SourceLocation getLocStart() const LLVM_READONLY
DependentCoawaitExpr(SourceLocation KeywordLoc, QualType Ty, Expr *Op, UnresolvedLookupExpr *OpCoawait)
UnresolvedSetImpl::iterator decls_iterator
StmtIterator child_iterator
Child Iterators: All subclasses must implement 'children' to permit easy iteration over the substatem...
CXXNewExpr(EmptyShell Shell)
ExplicitCastExpr(StmtClass SC, QualType exprTy, ExprValueKind VK, CastKind kind, Expr *op, unsigned PathSize, TypeSourceInfo *writtenTy)
MSPropertySubscriptExpr(Expr *Base, Expr *Idx, QualType Ty, ExprValueKind VK, ExprObjectKind OK, SourceLocation RBracketLoc)
const LambdaCapture * capture_iterator
An iterator that walks over the captures of the lambda, both implicit and explicit.
SourceLocation getParameterPackLocation() const
Retrieve the location of the parameter pack name.
static bool classof(const Stmt *T)
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will call.
static bool classof(const Stmt *T)
void setTypeOperandSourceInfo(TypeSourceInfo *TSI)
BlockDecl * CleanupObject
The type of objects that are kept in the cleanup.
decls_iterator decls_begin() const
unsigned getNumTemplateArgs() const
static bool classof(const Stmt *T)
SourceRange getSourceRange() const LLVM_READONLY
static bool classof(const Stmt *S)
const Expr * getInitializer() const
UnresolvedLookupExpr * getOperatorCoawaitLookup() const
const TemplateArgumentLoc * getTemplateArgs() const
Retrieve the template arguments provided as part of this template-id.
CanThrowResult
Possible results from evaluation of a noexcept expression.
void setLParenLoc(SourceLocation L)
llvm::iterator_range< const_arg_iterator > placement_arguments() const
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
bool cleanupsHaveSideEffects() const
SourceLocation getLocStart() const LLVM_READONLY
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class...
SourceLocation getLocEnd() const LLVM_READONLY
ArrayRef< CleanupObject > getObjects() const
MaterializeTemporaryExpr(EmptyShell Empty)
void copyInto(const TemplateArgumentLoc *ArgArray, TemplateArgumentListInfo &List) const
static CXXConstCastExpr * Create(const ASTContext &Context, QualType T, ExprValueKind VK, Expr *Op, TypeSourceInfo *WrittenTy, SourceLocation L, SourceLocation RParenLoc, SourceRange AngleBrackets)
static CXXBindTemporaryExpr * Create(const ASTContext &C, CXXTemporary *Temp, Expr *SubExpr)
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr...
Represents a call to an inherited base class constructor from an inheriting constructor.
operator "" X (const CharT *, size_t)
Expr ** getPlacementArgs()
static bool classof(const Stmt *T)
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getLocStart() const LLVM_READONLY
Raw form: operator "" X<cs...> ()
static CXXDynamicCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
SourceLocation getOperatorLoc() const
Determine the location of the 'sizeof' keyword.
CXXRecordDecl * getRecordDecl() const
Retrieves the CXXRecordDecl for the underlying type of the implicit object argument.
void setHadMultipleCandidates(bool V)
Encodes a location in the source.
TemplateArgumentLoc const * getTemplateArgs() const
const_arg_iterator arg_end() const
SourceLocation getLocEnd() const LLVM_READONLY
llvm::iterator_range< child_iterator > child_range
Defines enumerations for expression traits intrinsics.
static bool classof(const Stmt *T)
CXXNamedCastExpr(StmtClass SC, QualType ty, ExprValueKind VK, CastKind kind, Expr *op, unsigned PathSize, TypeSourceInfo *writtenTy, SourceLocation l, SourceLocation RParenLoc, SourceRange AngleBrackets)
Represents a C++ temporary.
SourceLocation getLocEnd() const LLVM_READONLY
static CXXDependentScopeMemberExpr * CreateEmpty(const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
PackExpansionExpr(EmptyShell Empty)
static CXXConstCastExpr * CreateEmpty(const ASTContext &Context)
bool isValid() const
Return true if this is a valid SourceLocation object.
NonTypeTemplateParmDecl * getParameter() const
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
SourceLocation getLocEnd() const
SourceLocation getOperatorLoc() const
Retrieve the location of the '.' or '->' operator.
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit...
SourceLocation getLocEnd() const
void setSourceRange(SourceRange R)
static SizeOfPackExpr * Create(ASTContext &Context, SourceLocation OperatorLoc, NamedDecl *Pack, SourceLocation PackLoc, SourceLocation RParenLoc, Optional< unsigned > Length=None, ArrayRef< TemplateArgument > PartialArgs=None)
Represents a call to a member function that may be written either with member call syntax (e...
SourceLocation getBeginLoc() const
Retrieve the location of the beginning of this nested-name-specifier.
llvm::iterator_range< capture_init_iterator > capture_inits()
Retrieve the initialization expressions for this lambda's captures.
static bool classof(const Stmt *T)
SourceLocation getRParenLoc() const
Expr * getSuspendExpr() const
CXXConstructExpr(const ASTContext &C, StmtClass SC, QualType T, SourceLocation Loc, CXXConstructorDecl *Ctor, bool Elidable, ArrayRef< Expr * > Args, bool HadMultipleCandidates, bool ListInitialization, bool StdInitListInitialization, bool ZeroInitialization, ConstructionKind ConstructKind, SourceRange ParenOrBraceRange)
OverloadExpr(StmtClass K, const ASTContext &C, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs, UnresolvedSetIterator Begin, UnresolvedSetIterator End, bool KnownDependent, bool KnownInstantiationDependent, bool KnownContainsUnexpandedParameterPack)
TemplateParameterList * getTemplateParameterList() const
If this is a generic lambda expression, retrieve the template parameter list associated with it...
TemplateArgument getArgumentPack() const
Retrieve the template argument pack containing the substituted template arguments.
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
SourceLocation getLocStart() const LLVM_READONLY
Represents a static or instance method of a struct/union/class.
void setTemporary(CXXTemporary *T)
static ExprWithCleanups * Create(const ASTContext &C, EmptyShell empty, unsigned numObjects)
static bool classof(const Stmt *T)
static bool classof(const Stmt *T)
SourceLocation RAngleLoc
The source location of the right angle bracket ('>').
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
void setDestructor(const CXXDestructorDecl *Dtor)
CXXTemporaryObjectExpr(const ASTContext &C, CXXConstructorDecl *Cons, QualType Type, TypeSourceInfo *TSI, ArrayRef< Expr * > Args, SourceRange ParenOrBraceRange, bool HadMultipleCandidates, bool ListInitialization, bool StdInitListInitialization, bool ZeroInitialization)
const DeclarationNameInfo & getMemberNameInfo() const
Retrieve the name of the member that this expression refers to.
bool isImplicitAccess() const
True if this is an implicit access, i.e.
bool isAssignmentOp() const
SourceLocation getLocStart() const LLVM_READONLY
void setConfig(CallExpr *E)
Sets the kernel configuration expression.
bool hasQualifier() const
Determines whether this member expression actually had a C++ nested-name-specifier prior to the name ...
NamedDecl * getPack() const
Retrieve the parameter pack.
bool hasInitializer() const
Whether this new-expression has any initializer at all.
SourceRange getIntroducerRange() const
Retrieve the source range covering the lambda introducer, which contains the explicit capture list su...
static bool classof(const Stmt *T)
QualType getBaseType() const
bool isInitCapture(const LambdaCapture *Capture) const
Determine whether one of this lambda's captures is an init-capture.
SourceLocation getOperatorLoc() const
Retrieve the location of the cast operator keyword, e.g., static_cast.
CXXNamedCastExpr(StmtClass SC, EmptyShell Shell, unsigned PathSize)
static CXXDefaultInitExpr * Create(const ASTContext &C, SourceLocation Loc, FieldDecl *Field)
Field is the non-static data member whose default initializer is used by this expression.
SourceLocation getLocEnd() const LLVM_READONLY
LiteralOperatorKind getLiteralOperatorKind() const
Returns the kind of literal operator invocation which this expression represents. ...
capture_iterator explicit_capture_end() const
Retrieve an iterator pointing past the end of the sequence of explicit lambda captures.
ParmVarDecl * getParameterPack() const
Get the parameter pack which this expression refers to.
SourceLocation getBegin() const
TypeTrait getTrait() const
Determine which type trait this expression uses.
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.
OverloadExpr(StmtClass K, EmptyShell Empty)
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '...
An expression trait intrinsic.
Expr * getCommonExpr() const
CXXOperatorCallExpr(ASTContext &C, EmptyShell Empty)
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
uint64_t getValue() const
SourceLocation getLocStart() const LLVM_READONLY
static SizeOfPackExpr * CreateDeserialized(ASTContext &Context, unsigned NumPartialArgs)
CoyieldExpr(SourceLocation CoyieldLoc, QualType Ty, Expr *Operand)
static LambdaExpr * Create(const ASTContext &C, CXXRecordDecl *Class, SourceRange IntroducerRange, LambdaCaptureDefault CaptureDefault, SourceLocation CaptureDefaultLoc, ArrayRef< LambdaCapture > Captures, bool ExplicitParams, bool ExplicitResultType, ArrayRef< Expr * > CaptureInits, SourceLocation ClosingBrace, bool ContainsUnexpandedParameterPack)
Construct a new lambda expression.
Expr ** capture_init_iterator
Iterator that walks over the capture initialization arguments.
SourceLocation getLocStart() const
bool passAlignment() const
Indicates whether the required alignment should be implicitly passed to the allocation function...
bool isParenTypeId() const
QualType getType() const
Return the type wrapped by this type source info.
static CXXReinterpretCastExpr * Create(const ASTContext &Context, QualType T, ExprValueKind VK, CastKind Kind, Expr *Op, const CXXCastPath *Path, TypeSourceInfo *WrittenTy, SourceLocation L, SourceLocation RParenLoc, SourceRange AngleBrackets)
A placeholder type used to construct an empty shell of a type, that will be filled in later (e...
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
PackExpansionExpr(QualType T, Expr *Pattern, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions)
SourceLocation getNameLoc() const
A qualified reference to a name whose declaration cannot yet be resolved.
void setRBracketLoc(SourceLocation L)
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getRBracketLoc() const
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof...
SourceLocation getLocation() const LLVM_READONLY
A POD class for pairing a NamedDecl* with an access specifier.
SourceLocation getLocEnd() const LLVM_READONLY
const Expr * getIdx() const
const char * getCastName() const
getCastName - Get the name of the C++ cast being used, e.g., "static_cast", "dynamic_cast", "reinterpret_cast", or "const_cast".
SourceLocation getLocStart() const LLVM_READONLY
DeclarationName getDeclName() const
Retrieve the name that this expression refers to.
SourceLocation getEllipsisLoc() const
Retrieve the location of the ellipsis that describes this pack expansion.
Represents a reference to a function parameter pack that has been substituted but not yet expanded...
Represents a template argument.
Expr * getReplacement() const
const Expr * getSubExpr() const
CXXTemporaryObjectExpr(EmptyShell Empty)
static bool classof(const Stmt *T)
const Expr * getSubExpr() const
void setExtendingDecl(const ValueDecl *ExtendedBy, unsigned ManglingNumber)
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getLocStart() const LLVM_READONLY
const Expr * getExpr() const
SourceLocation getLocEnd() const LLVM_READONLY
QualType getTypeOperand(ASTContext &Context) const
Retrieves the type operand of this typeid() expression after various required adjustments (removing r...
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
SourceLocation getLocEnd() const LLVM_READONLY
static bool classof(const Stmt *T)
bool hasUnparsedDefaultArg() const
hasUnparsedDefaultArg - Determines whether this parameter has a default argument that has not yet bee...
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
TemplateArgumentLoc const * getTemplateArgs() const
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
CXXNoexceptExpr(EmptyShell Empty)
NestedNameSpecifierLoc getQualifierLoc() const
Retrieves the nested-name-specifier that qualifies the type name, with source-location information...
Expr * getInit() const
Get the operand that doesn't contain a pack, for a binary fold.
CXXFoldExpr(EmptyShell Empty)
bool isThrownVariableInScope() const
Determines whether the variable thrown by this expression (if any!) is within the innermost try block...
Reads an AST files chain containing the contents of a translation unit.
ExprIterator arg_iterator
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getLParenLoc() const
BinaryOperator::Opcode getOpcode(const SymExpr *SE)
const_arg_iterator raw_arg_end() const
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
CXXNoexceptExpr(QualType Ty, Expr *Operand, CanThrowResult Val, SourceLocation Keyword, SourceLocation RParen)
SourceLocation getTildeLoc() const
Retrieve the location of the '~'.
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
Represents a 'co_yield' expression.
void setConstructionKind(ConstructionKind CK)
SourceLocation getMemberLoc() const
DeclarationName - The name of a declaration.
const FieldDecl * getField() const
virtual ~ArrayTypeTraitExpr()
OverloadExpr * Expression
Represents a C++11 pack expansion that produces a sequence of expressions.
static bool classof(const Stmt *T)
unsigned getNumPlacementArgs() const
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getLocEnd() const LLVM_READONLY
static LambdaExpr * CreateDeserialized(const ASTContext &C, unsigned NumCaptures)
Construct a new lambda expression that will be deserialized from an external source.
SourceLocation getLocEnd() const LLVM_READONLY
void setInstantiationDependent(bool ID)
Set whether this expression is instantiation-dependent or not.
const Expr * getArraySize() const
bool isTypeOperand() const
detail::InMemoryDirectory::const_iterator E
const Expr * getPlacementArg(unsigned i) const
friend class OverloadExpr
SourceLocation getLocation() const
CXXNullPtrLiteralExpr(QualType Ty, SourceLocation l)
ExplicitCastExpr - An explicit cast written in the source code.
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
unsigned getNumArgs() const
SourceLocation getParameterPackLocation() const
Get the location of the parameter pack.
SourceLocation getLocEnd() const LLVM_READONLY
CXXMemberCallExpr(ASTContext &C, Expr *fn, ArrayRef< Expr * > args, QualType t, ExprValueKind VK, SourceLocation RP)
CXXNullPtrLiteralExpr(EmptyShell Empty)
SourceLocation getLocEnd() const LLVM_READONLY
CXXRecordDecl * getNamingClass() const
Gets the 'naming class' (in the sense of C++0x [class.access.base]p5) of the lookup.
llvm::iterator_range< arg_iterator > arg_range
QualType getNonReferenceType() const
If Type is a reference type (e.g., const int&), returns the type that the reference refers to ("const...
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
TemplateArgumentLoc * getTrailingTemplateArgumentLoc()
Return the optional template arguments.
Location wrapper for a TemplateArgument.
Expr * getBase() const
Retrieve the base object of this member expressions, e.g., the x in x.m.
SourceLocation getOperatorLoc() const
Retrieve the location of the '->' or '.' operator.
llvm::iterator_range< capture_iterator > capture_range
An iterator over a range of lambda captures.
SourceLocation getLocEnd() const LLVM_READONLY
FunctionDecl * getOperatorNew() const
const T * getAs() const
Member-template getAs<specific type>'.
unsigned capture_size() const
Determine the number of captures in this lambda.
SourceLocation getExprLoc() const LLVM_READONLY
static bool classof(const Stmt *T)
capture_iterator explicit_capture_begin() const
Retrieve an iterator pointing to the first explicit lambda capture.
SourceLocation getLocEnd() const LLVM_READONLY
CoroutineSuspendExpr(StmtClass SC, EmptyShell Empty)
static UnresolvedMemberExpr * CreateEmpty(const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
void setSubExpr(Expr *E)
As with any mutator of the AST, be very careful when modifying an existing AST to preserve its invari...
const_arg_iterator raw_arg_begin() const
Represents a call to a CUDA kernel function.
Represents a 'co_await' expression.
TypeTraitExprBitfields TypeTraitExprBits
MaterializeTemporaryExpr(QualType T, Expr *Temporary, bool BoundToLvalueReference)
void setParenOrBraceRange(SourceRange Range)
SourceLocation getLocStart() const LLVM_READONLY
void setArg(unsigned Arg, Expr *ArgExpr)
Set the specified argument.
static bool classof(const Stmt *T)
CXXInheritedCtorInitExpr(SourceLocation Loc, QualType T, CXXConstructorDecl *Ctor, bool ConstructsVirtualBase, bool InheritedFromVirtualBase)
Construct a C++ inheriting construction expression.
SourceLocation getLocStart() const LLVM_READONLY
Note: getLocStart() is the start of the whole DependentScopeDeclRefExpr, and differs from getLocation...
Expr * getArg(unsigned Arg)
Return the specified argument.
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
Expr * getPattern() const
Get the pattern, that is, the operand that contains an unexpanded pack.
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
Expr * getExprOperand() const
CXXBoolLiteralExpr(bool val, QualType Ty, SourceLocation l)
static bool classof(const Stmt *T)
SourceLocation getLocStart() const LLVM_READONLY
Default argument expressions have no representation in the source, so they have an empty source range...
static bool classof(const Stmt *T)
SourceLocation getRParenLoc() const
Retrieve the location of the right parentheses (')') that follows the argument list.
static bool isAssignmentOp(OverloadedOperatorKind Opc)
static CXXFunctionalCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
SourceLocation getRParenLoc() const
bool inheritedFromVBase() const
Determine whether the inherited constructor is inherited from a virtual base of the object we constru...
CXXThrowExpr(EmptyShell Empty)
SourceLocation getLocStart() const LLVM_READONLY
SourceRange getDirectInitRange() const
arg_iterator placement_arg_begin()
SourceLocation getLocation() const
Represents an expression that might suspend coroutine execution; either a co_await or co_yield expres...
static FunctionParmPackExpr * Create(const ASTContext &Context, QualType T, ParmVarDecl *ParamPack, SourceLocation NameLoc, ArrayRef< ParmVarDecl * > Params)
SourceLocation getLocEnd() const LLVM_READONLY
void setLParenLoc(SourceLocation L)
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
A use of a default initializer in a constructor or in aggregate initialization.
const CXXConstructExpr * getConstructExpr() const
Returns the CXXConstructExpr from this new-expression, or null.
void setLocation(SourceLocation L)
static UnresolvedMemberExpr * Create(const ASTContext &C, bool HasUnresolvedUsing, Expr *Base, QualType BaseType, bool IsArrow, SourceLocation OperatorLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &MemberNameInfo, const TemplateArgumentListInfo *TemplateArgs, UnresolvedSetIterator Begin, UnresolvedSetIterator End)
static UnresolvedLookupExpr * CreateEmpty(const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
const internal::VariadicDynCastAllOfMatcher< Stmt, CastExpr > castExpr
Matches any cast nodes of Clang's AST.
capture_range explicit_captures() const
Retrieve this lambda's explicit captures.
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
bool isArrayFormAsWritten() const
ConstExprIterator const_arg_iterator
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
CoroutineSuspendExpr(StmtClass SC, SourceLocation KeywordLoc, QualType Ty, Expr *Common)
SourceLocation getLocStart() const LLVM_READONLY
const IdentifierInfo * getUDSuffix() const
Returns the ud-suffix specified for this literal.
SourceLocation getRParenLoc() const
Retrieve the location of the closing parenthesis.
Represents a C++ struct/union/class.
SourceLocation getExprLoc() const LLVM_READONLY
const Expr * getPattern() const
Retrieve the pattern of the pack expansion.
static CXXStaticCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getEllipsisLoc() const
capture_range implicit_captures() const
Retrieve this lambda's implicit captures.
SourceLocation getLocEnd() const LLVM_READONLY
static CXXTemporary * Create(const ASTContext &C, const CXXDestructorDecl *Destructor)
static CXXUnresolvedConstructExpr * CreateEmpty(const ASTContext &C, unsigned NumArgs)
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
static bool classof(const Stmt *T)
static TypeTraitExpr * Create(const ASTContext &C, QualType T, SourceLocation Loc, TypeTrait Kind, ArrayRef< TypeSourceInfo * > Args, SourceLocation RParenLoc, bool Value)
Create a new type trait expression.
static TypeTraitExpr * CreateDeserialized(const ASTContext &C, unsigned NumArgs)
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
NestedNameSpecifier * getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
ExpressionTraitExpr(EmptyShell Empty)
bool isLeftFold() const
Does this produce a left-associated sequence of operators?
SourceLocation getUDSuffixLoc() const
Returns the location of a ud-suffix in the expression.
const ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo() const
Return the optional template keyword and arguments info.
TypeSourceInfo * getQueriedTypeSourceInfo() const
const_arg_iterator arg_begin() const
SourceLocation getLocEnd() const LLVM_READONLY
unsigned kind
All of the diagnostics that can be emitted by the frontend.
void setExprOperand(Expr *E)
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
Full-expression storage duration (for temporaries).
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
SourceLocation getExprLoc() const LLVM_READONLY
CXXUuidofExpr(EmptyShell Empty, bool isExpr)
DeclarationName getName() const
Gets the name looked up.
CXXPseudoDestructorExpr(const ASTContext &Context, Expr *Base, bool isArrow, SourceLocation OperatorLoc, NestedNameSpecifierLoc QualifierLoc, TypeSourceInfo *ScopeType, SourceLocation ColonColonLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage DestroyedType)
Expr * getPattern()
Retrieve the pattern of the pack expansion.
bool constructsVBase() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
CXXTypeidExpr(EmptyShell Empty, bool isExpr)
static bool classof(const Stmt *T)
Abstract class common to all of the C++ "named"/"keyword" casts.
bool isStdInitListInitialization() const
Whether this constructor call was written as list-initialization, but was interpreted as forming a st...
SourceLocation getLocEnd() const LLVM_READONLY
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument for this lambda expression...
static bool classof(const Stmt *T)
ExprValueKind getValueKind() const
getValueKind - The value kind that this expression produces.
ArrayRef< TemplateArgumentLoc > template_arguments() const
CUDAKernelCallExpr(ASTContext &C, EmptyShell Empty)
const Expr * getSubExpr() const
CoawaitExpr(SourceLocation CoawaitLoc, Expr *Operand, Expr *Ready, Expr *Suspend, Expr *Resume, OpaqueValueExpr *OpaqueValue, bool IsImplicit=false)
TypeSourceInfo * getAllocatedTypeSourceInfo() const
bool hasTemplateKeyword() const
Determines whether the name was preceded by the template keyword.
ExprIterator arg_iterator
An instance of this class represents the declaration of a property member.
BinaryOperatorKind getOperator() const
An l-value expression is a reference to an object with independent storage.
SourceLocation getRParenLoc() const
Determine the location of the right parenthesis.
const_capture_init_iterator capture_init_end() const
Retrieve the iterator pointing one past the last initialization argument for this lambda expression...
arg_const_range arguments() const
A trivial tuple used to represent a source range.
DependentCoawaitExpr(EmptyShell Empty)
NamedDecl - This represents a decl with a name.
A boolean literal, per ([C++ lex.bool] Boolean literals).
NestedNameSpecifier * getQualifier() const
Fetches the nested-name qualifier, if one was given.
static bool classof(const Stmt *T)
CXXPseudoDestructorExpr(EmptyShell Shell)
QualType getDestroyedType() const
Retrieve the type being destroyed.
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
Expr * getOperand() const
Automatic storage duration (most local variables).
void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const
Copies the template arguments (if present) into the given structure.
void setStdInitListInitialization(bool V)
const CallExpr * getConfig() const
bool isTypeOperand() const
static bool classof(const Stmt *T)
SourceLocation LAngleLoc
The source location of the left angle bracket ('<').
static bool classof(const Stmt *T)
SourceLocation getLocStart() const LLVM_READONLY
CXXThrowExpr(Expr *expr, QualType Ty, SourceLocation l, bool IsThrownVariableInScope)
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '...
const CXXDestructorDecl * getDestructor() const
static bool classof(const Stmt *T)
CXXThisExpr(EmptyShell Empty)
CXXRecordDecl * getLambdaClass() const
Retrieve the class that corresponds to the lambda.
operator "" X (unsigned long long)
Defines the LambdaCapture class.
Expr * getCookedLiteral()
If this is not a raw user-defined literal, get the underlying cooked literal (representing the litera...
CXXConstructExpr(EmptyShell Empty)
Construct an empty C++ construction expression.
Expr * IgnoreParens() LLVM_READONLY
IgnoreParens - Ignore parentheses.
SourceLocation getLocEnd() const LLVM_READONLY
bool hasUnresolvedUsing() const
Determine whether the lookup results contain an unresolved using declaration.
static bool classof(const Stmt *T)