14#ifndef LLVM_CLANG_AST_EXPRCXX_H
15#define LLVM_CLANG_AST_EXPRCXX_H
43#include "llvm/ADT/ArrayRef.h"
44#include "llvm/ADT/PointerUnion.h"
45#include "llvm/ADT/STLExtras.h"
46#include "llvm/ADT/StringRef.h"
47#include "llvm/ADT/iterator_range.h"
48#include "llvm/Support/Casting.h"
49#include "llvm/Support/Compiler.h"
50#include "llvm/Support/TrailingObjects.h"
64class NonTypeTemplateParmDecl;
65class TemplateParameterList;
93 SourceRange getSourceRangeImpl() const LLVM_READONLY;
110 unsigned NumArgs,
bool HasFPFeatures,
120 return Opc == OO_Equal || Opc == OO_StarEqual || Opc == OO_SlashEqual ||
121 Opc == OO_PercentEqual || Opc == OO_PlusEqual ||
122 Opc == OO_MinusEqual || Opc == OO_LessLessEqual ||
123 Opc == OO_GreaterGreaterEqual || Opc == OO_AmpEqual ||
124 Opc == OO_CaretEqual || Opc == OO_PipeEqual;
131 case OO_ExclaimEqual:
133 case OO_GreaterEqual:
156 return (Operator < OO_Plus || Operator >= OO_Arrow ||
157 Operator == OO_PlusPlus || Operator == OO_MinusMinus)
167 return T->getStmtClass() == CXXOperatorCallExprClass;
194 unsigned MinNumArgs = 0);
229 return T->getStmtClass() == CXXMemberCallExprClass;
237 enum { CONFIG, END_PREARG };
254 unsigned MinNumArgs = 0);
257 unsigned NumArgs,
bool HasFPFeatures,
261 return cast_or_null<CallExpr>(
getPreArg(CONFIG));
266 return T->getStmtClass() == CUDAKernelCallExprClass;
294 :
Expr(CXXRewrittenBinaryOperatorClass, SemanticForm->
getType(),
296 SemanticForm(SemanticForm) {
301 :
Expr(CXXRewrittenBinaryOperatorClass,
Empty), SemanticForm() {}
360 return child_range(&SemanticForm, &SemanticForm + 1);
364 return T->getStmtClass() == CXXRewrittenBinaryOperatorClass;
390 Expr *op,
unsigned PathSize,
bool HasFPFeatures,
395 Loc(l), RParenLoc(RParenLoc), AngleBrackets(AngleBrackets) {}
416 switch (
T->getStmtClass()) {
417 case CXXStaticCastExprClass:
418 case CXXDynamicCastExprClass:
419 case CXXReinterpretCastExprClass:
420 case CXXConstCastExprClass:
421 case CXXAddrspaceCastExprClass:
435 private llvm::TrailingObjects<CXXStaticCastExpr, CXXBaseSpecifier *,
453 unsigned numTrailingObjects(OverloadToken<CXXBaseSpecifier *>)
const {
467 unsigned PathSize,
bool hasFPFeatures);
470 return T->getStmtClass() == CXXStaticCastExprClass;
481 private llvm::TrailingObjects<CXXDynamicCastExpr, CXXBaseSpecifier *> {
487 false, writtenTy, l, RParenLoc,
511 return T->getStmtClass() == CXXDynamicCastExprClass;
525 private llvm::TrailingObjects<CXXReinterpretCastExpr,
526 CXXBaseSpecifier *> {
532 pathSize,
false, writtenTy, l,
533 RParenLoc, AngleBrackets) {}
553 return T->getStmtClass() == CXXReinterpretCastExprClass;
566 private llvm::TrailingObjects<CXXConstCastExpr, CXXBaseSpecifier *> {
571 false, writtenTy, l, RParenLoc,
590 return T->getStmtClass() == CXXConstCastExprClass;
604 private llvm::TrailingObjects<CXXAddrspaceCastExpr, CXXBaseSpecifier *> {
609 false, writtenTy, l, RParenLoc,
627 return T->getStmtClass() == CXXAddrspaceCastExprClass;
664 unsigned NumArgs,
bool HasFPOptions,
718 return S->getStmtClass() == UserDefinedLiteralClass;
733 :
Expr(CXXBoolLiteralExprClass,
Empty) {}
750 return T->getStmtClass() == CXXBoolLiteralExprClass;
777 :
Expr(CXXNullPtrLiteralExprClass,
Empty) {}
786 return T->getStmtClass() == CXXNullPtrLiteralExprClass;
801 Stmt *SubExpr =
nullptr;
804 :
Expr(CXXStdInitializerListExprClass,
Empty) {}
833 return S->getStmtClass() == CXXStdInitializerListExprClass;
852 llvm::PointerUnion<Stmt *, TypeSourceInfo *> Operand;
871 Operand = (
Expr*)
nullptr;
892 assert(
isTypeOperand() &&
"Cannot call getTypeOperand for typeid(expr)");
893 return cast<TypeSourceInfo *>(Operand);
896 assert(!
isTypeOperand() &&
"Cannot call getExprOperand for typeid(type)");
897 return static_cast<Expr *
>(cast<Stmt *>(Operand));
906 return T->getStmtClass() == CXXTypeidExprClass;
913 auto **begin =
reinterpret_cast<Stmt **
>(&Operand);
950 TheDecl(
decl), MemberLoc(nameLoc), IsArrow(
isArrow),
951 QualifierLoc(qualifierLoc) {
968 else if (QualifierLoc)
986 return T->getStmtClass() == MSPropertyRefExprClass;
1010 enum { BASE_EXPR, IDX_EXPR, NUM_SUBEXPRS = 2 };
1012 Stmt *SubExprs[NUM_SUBEXPRS];
1015 void setBase(
Expr *
Base) { SubExprs[BASE_EXPR] =
Base; }
1016 void setIdx(
Expr *Idx) { SubExprs[IDX_EXPR] = Idx; }
1021 :
Expr(MSPropertySubscriptExprClass, Ty,
VK, OK),
1022 RBracketLoc(RBracketLoc) {
1023 SubExprs[BASE_EXPR] =
Base;
1024 SubExprs[IDX_EXPR] = Idx;
1030 :
Expr(MSPropertySubscriptExprClass, Shell) {}
1033 const Expr *
getBase()
const {
return cast<Expr>(SubExprs[BASE_EXPR]); }
1036 const Expr *
getIdx()
const {
return cast<Expr>(SubExprs[IDX_EXPR]); }
1052 return T->getStmtClass() == MSPropertySubscriptExprClass;
1057 return child_range(&SubExprs[0], &SubExprs[0] + NUM_SUBEXPRS);
1073 llvm::PointerUnion<Stmt *, TypeSourceInfo *> Operand;
1081 Guid(Guid),
Range(R) {
1087 Guid(Guid),
Range(R) {
1094 Operand = (
Expr*)
nullptr;
1107 assert(
isTypeOperand() &&
"Cannot call getTypeOperand for __uuidof(expr)");
1108 return cast<TypeSourceInfo *>(Operand);
1111 assert(!
isTypeOperand() &&
"Cannot call getExprOperand for __uuidof(type)");
1112 return static_cast<Expr *
>(cast<Stmt *>(Operand));
1123 return T->getStmtClass() == CXXUuidofExprClass;
1130 auto **begin =
reinterpret_cast<Stmt **
>(&Operand);
1159 CXXThisExprBits.CapturedByCopyInLambdaWithExplicitObjectParameter =
false;
1182 return CXXThisExprBits.CapturedByCopyInLambdaWithExplicitObjectParameter;
1191 return T->getStmtClass() == CXXThisExprClass;
1221 bool IsThrownVariableInScope)
1251 return T->getStmtClass() == CXXThrowExprClass;
1256 return child_range(&Operand, Operand ? &Operand + 1 : &Operand);
1271 private llvm::TrailingObjects<CXXDefaultArgExpr, Expr *> {
1274 friend TrailingObjects;
1285 Param->hasUnparsedDefaultArg()
1286 ? Param->
getType().getNonReferenceType()
1287 : Param->getDefaultArg()->
getType(),
1290 Param(Param), UsedContext(UsedContext) {
1294 *getTrailingObjects() = RewrittenExpr;
1304 static CXXDefaultArgExpr *
CreateEmpty(
const ASTContext &
C,
1305 bool HasRewrittenInit);
1309 static CXXDefaultArgExpr *
Create(
const ASTContext &
C, SourceLocation
Loc,
1310 ParmVarDecl *Param,
Expr *RewrittenExpr,
1311 DeclContext *UsedContext);
1355 return T->getStmtClass() == CXXDefaultArgExprClass;
1378 private llvm::TrailingObjects<CXXDefaultInitExpr, Expr *> {
1382 friend TrailingObjects;
1391 Expr *RewrittenInitExpr);
1394 :
Expr(CXXDefaultInitExprClass,
Empty) {
1400 bool HasRewrittenInit);
1405 Expr *RewrittenInitExpr);
1425 return *getTrailingObjects();
1432 return *getTrailingObjects();
1446 return T->getStmtClass() == CXXDefaultInitExprClass;
1465 : Destructor(destructor) {}
1496 Stmt *SubExpr =
nullptr;
1499 :
Expr(CXXBindTemporaryExprClass, SubExpr->getType(),
VK_PRValue,
1501 Temp(temp), SubExpr(SubExpr) {
1507 :
Expr(CXXBindTemporaryExprClass,
Empty) {}
1530 return T->getStmtClass() == CXXBindTemporaryExprClass;
1576 inline Stmt **getTrailingArgs();
1577 const Stmt *
const *getTrailingArgs()
const {
1586 bool ListInitialization,
bool StdInitListInitialization,
1596 return NumArgs *
sizeof(
Stmt *);
1604 bool HadMultipleCandidates,
bool ListInitialization,
1605 bool StdInitListInitialization,
bool ZeroInitialization,
1685 return reinterpret_cast<const Expr *
const *
>(getTrailingArgs());
1693 assert(Arg <
getNumArgs() &&
"Arg access out of range!");
1697 assert(Arg <
getNumArgs() &&
"Arg access out of range!");
1703 assert(Arg <
getNumArgs() &&
"Arg access out of range!");
1718 std::pair<const NamedDecl *, const WarnUnusedResultAttr *>
1734 return T->getStmtClass() == CXXConstructExprClass ||
1735 T->getStmtClass() == CXXTemporaryObjectExprClass;
1761 LLVM_PREFERRED_TYPE(
bool)
1762 unsigned ConstructsVirtualBase : 1;
1766 LLVM_PREFERRED_TYPE(
bool)
1767 unsigned InheritedFromVirtualBase : 1;
1775 bool InheritedFromVirtualBase)
1777 Constructor(Ctor),
Loc(
Loc),
1778 ConstructsVirtualBase(ConstructsVirtualBase),
1779 InheritedFromVirtualBase(InheritedFromVirtualBase) {
1786 :
Expr(CXXInheritedCtorInitExprClass,
Empty),
1787 ConstructsVirtualBase(
false), InheritedFromVirtualBase(
false) {}
1811 return T->getStmtClass() == CXXInheritedCtorInitExprClass;
1832 private llvm::TrailingObjects<CXXFunctionalCastExpr, CXXBaseSpecifier *,
1833 FPOptionsOverride> {
1844 LParenLoc(lParenLoc), RParenLoc(rParenLoc) {
1854 unsigned numTrailingObjects(OverloadToken<CXXBaseSpecifier *>)
const {
1882 return T->getStmtClass() == CXXFunctionalCastExprClass;
1913 bool HadMultipleCandidates,
bool ListInitialization,
1914 bool StdInitListInitialization,
1915 bool ZeroInitialization);
1923 SourceRange ParenOrBraceRange,
bool HadMultipleCandidates,
1924 bool ListInitialization,
bool StdInitListInitialization,
1925 bool ZeroInitialization);
1936 return T->getStmtClass() == CXXTemporaryObjectExprClass;
1940Stmt **CXXConstructExpr::getTrailingArgs() {
1941 if (
auto *
E = dyn_cast<CXXTemporaryObjectExpr>(
this))
1942 return reinterpret_cast<Stmt **
>(
E + 1);
1944 "Unexpected class deriving from CXXConstructExpr!");
1945 return reinterpret_cast<Stmt **
>(
this + 1);
1970 private llvm::TrailingObjects<LambdaExpr, Stmt *> {
1994 SourceLocation ClosingBrace,
bool ContainsUnexpandedParameterPack);
1999 Stmt **getStoredStmts() {
return getTrailingObjects(); }
2000 Stmt *
const *getStoredStmts()
const {
return getTrailingObjects(); }
2002 void initBodyIfNeeded()
const;
2013 bool ExplicitParams,
bool ExplicitResultType,
2015 bool ContainsUnexpandedParameterPack);
2020 unsigned NumCaptures);
2097 return reinterpret_cast<Expr **
>(getStoredStmts());
2103 return reinterpret_cast<Expr *
const *
>(getStoredStmts());
2163 const auto *ConstThis =
this;
2164 return const_cast<CompoundStmt *
>(ConstThis->getCompoundStmtBody());
2181 return T->getStmtClass() == LambdaExprClass;
2185 return IntroducerRange.getBegin();
2215 :
Expr(CXXScalarValueInitExprClass, Shell) {}
2229 return T->getStmtClass() == CXXScalarValueInitExprClass;
2349 private llvm::TrailingObjects<CXXNewExpr, Stmt *, SourceRange> {
2352 friend TrailingObjects;
2384 unsigned arraySizeOffset()
const {
return 0; }
2385 unsigned initExprOffset()
const {
return arraySizeOffset() +
isArray(); }
2386 unsigned placementNewArgsOffset()
const {
2390 unsigned numTrailingObjects(OverloadToken<Stmt *>)
const {
2394 unsigned numTrailingObjects(OverloadToken<SourceRange>)
const {
2399 CXXNewExpr(
bool IsGlobalNew, FunctionDecl *OperatorNew,
2400 FunctionDecl *OperatorDelete,
2401 const ImplicitAllocationParameters &IAP,
2402 bool UsualArrayDeleteWantsSize, ArrayRef<Expr *> PlacementArgs,
2403 SourceRange TypeIdParens, std::optional<Expr *> ArraySize,
2405 QualType Ty, TypeSourceInfo *AllocatedTypeInfo, SourceRange
Range,
2406 SourceRange DirectInitRange);
2409 CXXNewExpr(EmptyShell
Empty,
bool IsArray,
unsigned NumPlacementArgs,
2410 bool IsParenTypeId);
2415 Create(
const ASTContext &Ctx,
bool IsGlobalNew, FunctionDecl *OperatorNew,
2416 FunctionDecl *OperatorDelete,
const ImplicitAllocationParameters &IAP,
2417 bool UsualArrayDeleteWantsSize, ArrayRef<Expr *> PlacementArgs,
2418 SourceRange TypeIdParens, std::optional<Expr *> ArraySize,
2420 QualType Ty, TypeSourceInfo *AllocatedTypeInfo, SourceRange
Range,
2421 SourceRange DirectInitRange);
2424 static CXXNewExpr *
CreateEmpty(
const ASTContext &Ctx,
bool IsArray,
2425 bool HasInit,
unsigned NumPlacementArgs,
2426 bool IsParenTypeId);
2433 return AllocatedTypeInfo;
2465 return std::nullopt;
2468 cast_or_null<Expr>(getTrailingObjects<Stmt *>()[arraySizeOffset()]))
2471 return std::nullopt;
2479 return std::nullopt;
2482 cast_or_null<Expr>(getTrailingObjects<Stmt *>()[arraySizeOffset()]))
2485 return std::nullopt;
2493 return reinterpret_cast<Expr **
>(getTrailingObjects<Stmt *>() +
2494 placementNewArgsOffset());
2511 return isParenTypeId() ? getTrailingObjects<SourceRange>()[0]
2529 ? cast<Expr>(getTrailingObjects<Stmt *>()[initExprOffset()])
2534 ? cast<Expr>(getTrailingObjects<Stmt *>()[initExprOffset()])
2575 return getTrailingObjects<Stmt *>() + placementNewArgsOffset();
2581 return getTrailingObjects<Stmt *>() + placementNewArgsOffset();
2591 return raw_arg_begin() + numTrailingObjects(OverloadToken<Stmt *>());
2594 return getTrailingObjects<Stmt *>();
2597 return raw_arg_begin() + numTrailingObjects(OverloadToken<Stmt *>());
2607 return T->getStmtClass() == CXXNewExprClass;
2627 Stmt *Argument =
nullptr;
2631 bool ArrayFormAsWritten,
bool UsualArrayDeleteWantsSize,
2634 OperatorDelete(OperatorDelete), Argument(Arg) {
2676 return T->getStmtClass() == CXXDeleteExprClass;
2691 llvm::PointerUnion<TypeSourceInfo *, const IdentifierInfo *>
Type;
2747 LLVM_PREFERRED_TYPE(
bool)
2781 :
Expr(CXXPseudoDestructorExprClass, Shell), IsArrow(
false) {}
2864 return Base->getBeginLoc();
2869 return T->getStmtClass() == CXXPseudoDestructorExprClass;
2890 private llvm::TrailingObjects<TypeTraitExpr, APValue, TypeSourceInfo *> {
2899 std::variant<bool, APValue>
Value);
2903 size_t numTrailingObjects(OverloadToken<TypeSourceInfo *>)
const {
2907 size_t numTrailingObjects(OverloadToken<APValue>)
const {
2929 bool IsStoredAsBool,
2948 return *getTrailingObjects<APValue>();
2956 assert(I <
getNumArgs() &&
"Argument out-of-range");
2962 return getTrailingObjects<TypeSourceInfo *>(
getNumArgs());
2969 return T->getStmtClass() == TypeTraitExprClass;
3013 Value(value), Dimension(dimension),
Loc(loc), RParen(rparen),
3014 QueriedType(queried) {
3015 assert(att <=
ATT_Last &&
"invalid enum value!");
3023 :
Expr(ArrayTypeTraitExprClass,
Empty) {
3043 return T->getStmtClass() == ArrayTypeTraitExprClass;
3071 Expr* QueriedExpression =
nullptr;
3079 Loc(loc), RParen(rparen), QueriedExpression(queried) {
3083 assert(et <=
ET_Last &&
"invalid enum value!");
3090 :
Expr(ExpressionTraitExprClass,
Empty) {
3107 return T->getStmtClass() == ExpressionTraitExprClass;
3139 bool KnownDependent,
bool KnownInstantiationDependent,
3140 bool KnownContainsUnexpandedParameterPack);
3143 bool HasTemplateKWAndArgsInfo);
3184 assert(
E->getType()->isSpecificBuiltinType(BuiltinType::Overload));
3187 bool HasParen = isa<ParenExpr>(
E);
3189 E =
E->IgnoreParens();
3190 if (isa<UnaryOperator>(
E)) {
3191 assert(cast<UnaryOperator>(
E)->getOpcode() == UO_AddrOf);
3192 E = cast<UnaryOperator>(
E)->getSubExpr();
3193 auto *Ovl = cast<OverloadExpr>(
E->IgnoreParens());
3195 Result.HasFormOfMemberPointer = (
E == Ovl && Ovl->getQualifier());
3196 Result.IsAddressOfOperand =
true;
3197 Result.IsAddressOfOperandWithParen = HasParen;
3200 Result.Expression = cast<OverloadExpr>(
E);
3221 llvm::iterator_range<decls_iterator>
decls()
const {
3287 if (
auto *TTP = dyn_cast_or_null<TemplateTemplateParmDecl>(
3298 if (
auto *TTP = dyn_cast_or_null<TemplateTemplateParmDecl>(
3314 return dyn_cast_or_null<TemplateTemplateParmDecl>(
3342 return T->getStmtClass() == UnresolvedLookupExprClass ||
3343 T->getStmtClass() == UnresolvedMemberExprClass;
3382 private llvm::TrailingObjects<UnresolvedLookupExpr, DeclAccessPair,
3383 ASTTemplateKWAndArgsInfo,
3384 TemplateArgumentLoc> {
3387 friend TrailingObjects;
3414 bool KnownDependent,
bool KnownInstantiationDependent);
3417 bool HasTemplateKWAndArgsInfo);
3419 unsigned numTrailingObjects(OverloadToken<DeclAccessPair>)
const {
3423 unsigned numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
3428 static UnresolvedLookupExpr *
3429 Create(
const ASTContext &Context, CXXRecordDecl *NamingClass,
3430 NestedNameSpecifierLoc QualifierLoc,
3431 const DeclarationNameInfo &NameInfo,
bool RequiresADL,
3432 UnresolvedSetIterator
Begin, UnresolvedSetIterator End,
3433 bool KnownDependent,
bool KnownInstantiationDependent);
3438 static UnresolvedLookupExpr *
3439 Create(
const ASTContext &Context, CXXRecordDecl *NamingClass,
3440 NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc,
3441 const DeclarationNameInfo &NameInfo,
bool RequiresADL,
3442 const TemplateArgumentListInfo *Args, UnresolvedSetIterator
Begin,
3443 UnresolvedSetIterator End,
bool KnownDependent,
3444 bool KnownInstantiationDependent);
3446 static UnresolvedLookupExpr *
CreateEmpty(
const ASTContext &Context,
3447 unsigned NumResults,
3448 bool HasTemplateKWAndArgsInfo,
3449 unsigned NumTemplateArgs);
3463 return l.getBeginLoc();
3482 return T->getStmtClass() == UnresolvedLookupExprClass;
3502 private llvm::TrailingObjects<DependentScopeDeclRefExpr,
3503 ASTTemplateKWAndArgsInfo,
3504 TemplateArgumentLoc> {
3507 friend TrailingObjects;
3521 size_t numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
3522 return hasTemplateKWAndArgsInfo();
3525 bool hasTemplateKWAndArgsInfo()
const {
3530 static DependentScopeDeclRefExpr *
3531 Create(
const ASTContext &Context, NestedNameSpecifierLoc QualifierLoc,
3532 SourceLocation TemplateKWLoc,
const DeclarationNameInfo &NameInfo,
3533 const TemplateArgumentListInfo *TemplateArgs);
3535 static DependentScopeDeclRefExpr *
CreateEmpty(
const ASTContext &Context,
3536 bool HasTemplateKWAndArgsInfo,
3537 unsigned NumTemplateArgs);
3563 if (!hasTemplateKWAndArgsInfo())
3565 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->TemplateKWLoc;
3571 if (!hasTemplateKWAndArgsInfo())
3573 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->LAngleLoc;
3579 if (!hasTemplateKWAndArgsInfo())
3581 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->RAngleLoc;
3594 getTrailingObjects<ASTTemplateKWAndArgsInfo>()->copyInto(
3595 getTrailingObjects<TemplateArgumentLoc>(), List);
3602 return getTrailingObjects<TemplateArgumentLoc>();
3609 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->NumTemplateArgs;
3629 return T->getStmtClass() == DependentScopeDeclRefExprClass;
3653 private llvm::TrailingObjects<
3655 llvm::PointerUnion<BlockDecl *, CompoundLiteralExpr *>> {
3665 friend TrailingObjects;
3673 unsigned numObjects);
3676 bool CleanupsHaveSideEffects,
3704 return T->getStmtClass() == ExprWithCleanupsClass;
3738 private llvm::TrailingObjects<CXXUnresolvedConstructExpr, Expr *> {
3740 friend TrailingObjects;
3744 llvm::PointerIntPair<TypeSourceInfo *, 1> TypeAndInitForm;
3757 :
Expr(CXXUnresolvedConstructExprClass,
Empty) {
3777 return TypeAndInitForm.getPointer();
3815 assert(I <
getNumArgs() &&
"Argument index out-of-range");
3820 assert(I <
getNumArgs() &&
"Argument index out-of-range");
3825 assert(I <
getNumArgs() &&
"Argument index out-of-range");
3837 return T->getStmtClass() == CXXUnresolvedConstructExprClass;
3847 auto **begin =
reinterpret_cast<Stmt **
>(
3862 private llvm::TrailingObjects<CXXDependentScopeMemberExpr,
3863 ASTTemplateKWAndArgsInfo,
3864 TemplateArgumentLoc, NamedDecl *> {
3867 friend TrailingObjects;
3903 bool hasTemplateKWAndArgsInfo()
const {
3907 bool hasFirstQualifierFoundInScope()
const {
3911 unsigned numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
3912 return hasTemplateKWAndArgsInfo();
3915 unsigned numTrailingObjects(OverloadToken<TemplateArgumentLoc>)
const {
3919 CXXDependentScopeMemberExpr(
const ASTContext &Ctx,
Expr *
Base,
3920 QualType BaseType,
bool IsArrow,
3921 SourceLocation OperatorLoc,
3922 NestedNameSpecifierLoc QualifierLoc,
3923 SourceLocation TemplateKWLoc,
3924 NamedDecl *FirstQualifierFoundInScope,
3925 DeclarationNameInfo MemberNameInfo,
3926 const TemplateArgumentListInfo *TemplateArgs);
3928 CXXDependentScopeMemberExpr(EmptyShell
Empty,
bool HasTemplateKWAndArgsInfo,
3929 bool HasFirstQualifierFoundInScope);
3932 static CXXDependentScopeMemberExpr *
3933 Create(
const ASTContext &Ctx,
Expr *
Base, QualType BaseType,
bool IsArrow,
3934 SourceLocation OperatorLoc, NestedNameSpecifierLoc QualifierLoc,
3935 SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierFoundInScope,
3936 DeclarationNameInfo MemberNameInfo,
3937 const TemplateArgumentListInfo *TemplateArgs);
3939 static CXXDependentScopeMemberExpr *
3940 CreateEmpty(
const ASTContext &Ctx,
bool HasTemplateKWAndArgsInfo,
3941 unsigned NumTemplateArgs,
bool HasFirstQualifierFoundInScope);
3949 return cast<Expr>(
Base)->isImplicitCXXThis();
3956 return cast<Expr>(
Base);
3991 if (!hasFirstQualifierFoundInScope())
3993 return *getTrailingObjects<NamedDecl *>();
3998 return MemberNameInfo;
4011 if (!hasTemplateKWAndArgsInfo())
4013 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->TemplateKWLoc;
4019 if (!hasTemplateKWAndArgsInfo())
4021 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->LAngleLoc;
4027 if (!hasTemplateKWAndArgsInfo())
4029 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->RAngleLoc;
4043 getTrailingObjects<ASTTemplateKWAndArgsInfo>()->copyInto(
4044 getTrailingObjects<TemplateArgumentLoc>(), List);
4053 return getTrailingObjects<TemplateArgumentLoc>();
4062 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->NumTemplateArgs;
4071 return Base->getBeginLoc();
4084 return T->getStmtClass() == CXXDependentScopeMemberExprClass;
4118 private llvm::TrailingObjects<UnresolvedMemberExpr, DeclAccessPair,
4119 ASTTemplateKWAndArgsInfo,
4120 TemplateArgumentLoc> {
4123 friend TrailingObjects;
4161 bool HasTemplateKWAndArgsInfo);
4163 unsigned numTrailingObjects(OverloadToken<DeclAccessPair>)
const {
4167 unsigned numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
4172 static UnresolvedMemberExpr *
4173 Create(
const ASTContext &Context,
bool HasUnresolvedUsing, Expr *
Base,
4174 QualType BaseType,
bool IsArrow, SourceLocation OperatorLoc,
4175 NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc,
4176 const DeclarationNameInfo &MemberNameInfo,
4177 const TemplateArgumentListInfo *TemplateArgs,
4178 UnresolvedSetIterator
Begin, UnresolvedSetIterator End);
4180 static UnresolvedMemberExpr *
CreateEmpty(
const ASTContext &Context,
4181 unsigned NumResults,
4182 bool HasTemplateKWAndArgsInfo,
4183 unsigned NumTemplateArgs);
4195 return cast<Expr>(
Base);
4199 return cast<Expr>(
Base);
4240 return Base->getBeginLoc();
4242 return l.getBeginLoc();
4253 return T->getStmtClass() == UnresolvedMemberExprClass;
4271 if (
auto *ULE = dyn_cast<UnresolvedLookupExpr>(
this))
4273 return cast<UnresolvedMemberExpr>(
this)->getTrailingObjects<
DeclAccessPair>();
4280 if (
auto *ULE = dyn_cast<UnresolvedLookupExpr>(
this))
4282 return cast<UnresolvedMemberExpr>(
this)
4287 if (
auto *ULE = dyn_cast<UnresolvedLookupExpr>(
this))
4289 return cast<UnresolvedMemberExpr>(
this)
4294 if (
auto *ULE = dyn_cast<UnresolvedLookupExpr>(
this))
4295 return ULE->getNamingClass();
4296 return cast<UnresolvedMemberExpr>(
this)->getNamingClass();
4329 return T->getStmtClass() == CXXNoexceptExprClass;
4368 unsigned NumExpansions;
4375 :
Expr(PackExpansionExprClass, Pattern->
getType(),
4377 EllipsisLoc(EllipsisLoc),
4378 NumExpansions(NumExpansions ? *NumExpansions + 1 : 0),
4399 return NumExpansions - 1;
4401 return std::nullopt;
4411 return T->getStmtClass() == PackExpansionExprClass;
4435 private llvm::TrailingObjects<SizeOfPackExpr, TemplateArgument> {
4438 friend TrailingObjects;
4470 OperatorLoc(OperatorLoc), PackLoc(PackLoc), RParenLoc(RParenLoc),
4471 Length(Length ? *Length : PartialArgs.size()), Pack(Pack) {
4472 assert((!Length || PartialArgs.empty()) &&
4473 "have partial args for non-dependent sizeof... expression");
4474 auto *Args = getTrailingObjects();
4475 llvm::uninitialized_copy(PartialArgs, Args);
4477 : ExprDependence::ValueInstantiation);
4482 :
Expr(SizeOfPackExprClass,
Empty), Length(NumPartialArgs) {}
4485 static SizeOfPackExpr *
Create(ASTContext &Context, SourceLocation OperatorLoc,
4486 NamedDecl *Pack, SourceLocation PackLoc,
4487 SourceLocation RParenLoc,
4488 UnsignedOrNone Length = std::nullopt,
4489 ArrayRef<TemplateArgument> PartialArgs = {});
4491 unsigned NumPartialArgs);
4511 "Cannot get the length of a value-dependent pack size expression");
4527 return getTrailingObjects(Length);
4534 return T->getStmtClass() == SizeOfPackExprClass;
4549 private llvm::TrailingObjects<PackIndexingExpr, Expr *> {
4552 friend TrailingObjects;
4565 bool FullySubstituted =
false)
4567 EllipsisLoc(EllipsisLoc), RSquareLoc(RSquareLoc),
4568 SubExprs{PackIdExpr, IndexExpr} {
4571 llvm::uninitialized_copy(SubstitutedExprs, getTrailingObjects());
4579 PackIndexingExpr(EmptyShell
Empty) :
Expr(PackIndexingExprClass,
Empty) {}
4581 unsigned numTrailingObjects(OverloadToken<Expr *>)
const {
4586 static PackIndexingExpr *
Create(ASTContext &Context,
4587 SourceLocation EllipsisLoc,
4588 SourceLocation RSquareLoc,
Expr *PackIdExpr,
4589 Expr *IndexExpr, std::optional<int64_t> Index,
4590 ArrayRef<Expr *> SubstitutedExprs = {},
4591 bool FullySubstituted =
false);
4593 unsigned NumTransformedExprs);
4626 return std::nullopt;
4629 assert(Index.isNonNegative() &&
"Invalid index");
4630 return static_cast<unsigned>(Index.getExtValue());
4635 assert(Index &&
"extracting the indexed expression of a dependant pack");
4636 return getTrailingObjects()[*Index];
4645 return T->getStmtClass() == PackIndexingExprClass;
4668 llvm::PointerIntPair<Decl *, 1, bool> AssociatedDeclAndRef;
4670 unsigned Index : 15;
4671 unsigned PackIndex : 15;
4672 LLVM_PREFERRED_TYPE(
bool)
4676 :
Expr(SubstNonTypeTemplateParmExprClass,
Empty) {}
4681 Decl *AssociatedDecl,
unsigned Index,
4684 :
Expr(SubstNonTypeTemplateParmExprClass, Ty, ValueKind,
OK_Ordinary),
4685 Replacement(Replacement),
4686 AssociatedDeclAndRef(AssociatedDecl, RefParam), Index(Index),
4687 PackIndex(PackIndex.toInternalRepresentation()), Final(Final) {
4688 assert(AssociatedDecl !=
nullptr);
4725 return s->getStmtClass() == SubstNonTypeTemplateParmExprClass;
4753 Decl *AssociatedDecl;
4760 unsigned NumArguments : 15;
4762 LLVM_PREFERRED_TYPE(
bool)
4765 unsigned Index : 16;
4771 :
Expr(SubstNonTypeTemplateParmPackExprClass,
Empty) {}
4777 Decl *AssociatedDecl,
unsigned Index,
4806 return T->getStmtClass() == SubstNonTypeTemplateParmPackExprClass;
4835 private llvm::TrailingObjects<FunctionParmPackExpr, ValueDecl *> {
4838 friend TrailingObjects;
4847 unsigned NumParameters;
4850 unsigned NumParams,
ValueDecl *
const *Params);
4858 unsigned NumParams);
4882 return T->getStmtClass() == FunctionParmPackExprClass;
4919 llvm::PointerUnion<Stmt *, LifetimeExtendedTemporaryDecl *> State;
4923 bool BoundToLvalueReference,
4927 :
Expr(MaterializeTemporaryExprClass,
Empty) {}
4934 ? cast<Stmt *>(State)
4935 : cast<LifetimeExtendedTemporaryDecl *>(State)->getTemporaryExpr());
4941 : cast<LifetimeExtendedTemporaryDecl *>(State)
4942 ->getStorageDuration();
4948 assert(isa<LifetimeExtendedTemporaryDecl *>(State) &&
4949 "the temporary has not been lifetime extended");
4950 return cast<LifetimeExtendedTemporaryDecl *>(State)->getOrCreateValue(
4965 return isa<Stmt *>(State) ? nullptr
4966 : cast<LifetimeExtendedTemporaryDecl *>(State)
4967 ->getExtendingDecl();
4976 return isa<Stmt *>(State) ? 0
4977 : cast<LifetimeExtendedTemporaryDecl *>(State)
4978 ->getManglingNumber();
4998 return T->getStmtClass() == MaterializeTemporaryExprClass;
5003 return isa<Stmt *>(State)
5004 ?
child_range(State.getAddrOfPtr1(), State.getAddrOfPtr1() + 1)
5005 : cast<LifetimeExtendedTemporaryDecl *>(State)->childrenExpr();
5009 return isa<Stmt *>(State)
5011 State.getAddrOfPtr1() + 1)
5013 cast<LifetimeExtendedTemporaryDecl *>(State))
5030 enum SubExpr { Callee, LHS, RHS, Count };
5038 Stmt *SubExprs[SubExpr::Count];
5092 return T->getStmtClass() == CXXFoldExprClass;
5097 return child_range(SubExprs, SubExprs + SubExpr::Count);
5135 private llvm::TrailingObjects<CXXParenListInitExpr, Expr *> {
5141 unsigned NumUserSpecifiedExprs;
5143 llvm::PointerUnion<Expr *, FieldDecl *> ArrayFillerOrUnionFieldInit;
5149 NumExprs(Args.size()), NumUserSpecifiedExprs(NumUserSpecifiedExprs),
5150 InitLoc(InitLoc), LParenLoc(LParenLoc), RParenLoc(RParenLoc) {
5151 llvm::copy(Args, getTrailingObjects());
5152 assert(NumExprs >= NumUserSpecifiedExprs &&
5153 "number of user specified inits is greater than the number of "
5158 size_t numTrailingObjects(OverloadToken<Expr *>)
const {
return NumExprs; }
5161 static CXXParenListInitExpr *
5162 Create(ASTContext &
C, ArrayRef<Expr *> Args, QualType
T,
5163 unsigned NumUserSpecifiedExprs, SourceLocation InitLoc,
5164 SourceLocation LParenLoc, SourceLocation RParenLoc);
5166 static CXXParenListInitExpr *
CreateEmpty(ASTContext &
C,
unsigned numExprs,
5170 :
Expr(CXXParenListInitExprClass,
Empty), NumExprs(NumExprs),
5171 NumUserSpecifiedExprs(0) {}
5176 return getTrailingObjects(NumExprs);
5182 return getTrailingObjects(NumUserSpecifiedExprs);
5186 return getTrailingObjects(NumUserSpecifiedExprs);
5202 return dyn_cast_if_present<Expr *>(ArrayFillerOrUnionFieldInit);
5206 return dyn_cast_if_present<Expr *>(ArrayFillerOrUnionFieldInit);
5210 ArrayFillerOrUnionFieldInit = FD;
5214 return dyn_cast_if_present<FieldDecl *>(ArrayFillerOrUnionFieldInit);
5218 return dyn_cast_if_present<FieldDecl *>(ArrayFillerOrUnionFieldInit);
5222 Stmt **
Begin =
reinterpret_cast<Stmt **
>(getTrailingObjects());
5227 Stmt *
const *
Begin =
reinterpret_cast<Stmt *
const *
>(getTrailingObjects());
5232 return T->getStmtClass() == CXXParenListInitExprClass;
5254 enum SubExpr { Operand, Common, Ready, Suspend, Resume, Count };
5256 Stmt *SubExprs[SubExpr::Count];
5268 KeywordLoc(KeywordLoc), OpaqueValue(OpaqueValue) {
5269 SubExprs[SubExpr::Operand] = Operand;
5270 SubExprs[SubExpr::Common] = Common;
5271 SubExprs[SubExpr::Ready] = Ready;
5272 SubExprs[SubExpr::Suspend] = Suspend;
5273 SubExprs[SubExpr::Resume] = Resume;
5281 "wrong constructor for non-dependent co_await/co_yield expression");
5282 SubExprs[SubExpr::Operand] = Operand;
5283 SubExprs[SubExpr::Common] = Common;
5284 SubExprs[SubExpr::Ready] =
nullptr;
5285 SubExprs[SubExpr::Suspend] =
nullptr;
5286 SubExprs[SubExpr::Resume] =
nullptr;
5291 SubExprs[SubExpr::Operand] =
nullptr;
5292 SubExprs[SubExpr::Common] =
nullptr;
5293 SubExprs[SubExpr::Ready] =
nullptr;
5294 SubExprs[SubExpr::Suspend] =
nullptr;
5295 SubExprs[SubExpr::Resume] =
nullptr;
5299 return static_cast<Expr*
>(SubExprs[SubExpr::Common]);
5306 return static_cast<Expr*
>(SubExprs[SubExpr::Ready]);
5310 return static_cast<Expr*
>(SubExprs[SubExpr::Suspend]);
5314 return static_cast<Expr*
>(SubExprs[SubExpr::Resume]);
5319 return static_cast<Expr *
>(SubExprs[SubExpr::Operand]);
5324 assert(SuspendExpr);
5326 auto SuspendType = SuspendExpr->getType();
5328 if (SuspendType->isVoidType())
5330 if (SuspendType->isBooleanType())
5336 assert(SuspendType->isVoidPointerType());
5349 return child_range(SubExprs, SubExprs + SubExpr::Count);
5357 return T->getStmtClass() == CoawaitExprClass ||
5358 T->getStmtClass() == CoyieldExprClass;
5371 Ready, Suspend, Resume, OpaqueValue) {
5376 Expr *Common,
bool IsImplicit =
false)
5389 return T->getStmtClass() == CoawaitExprClass;
5405 KeywordLoc(KeywordLoc) {
5409 "wrong constructor for non-dependent co_await/co_yield expression");
5411 SubExprs[1] = OpCoawait;
5416 :
Expr(DependentCoawaitExprClass,
Empty) {}
5421 return cast<UnresolvedLookupExpr>(SubExprs[1]);
5439 return T->getStmtClass() == DependentCoawaitExprClass;
5452 Ready, Suspend, Resume, OpaqueValue) {}
5461 return T->getStmtClass() == CoyieldExprClass;
5470 private llvm::TrailingObjects<BuiltinBitCastExpr, CXXBaseSpecifier *> {
5473 friend TrailingObjects;
5484 KWLoc(KWLoc), RParenLoc(RParenLoc) {}
5492 return T->getStmtClass() == BuiltinBitCastExprClass;
This file provides AST data structures related to concepts.
enum clang::sema::@1840::IndirectLocalPathEntry::EntryKind Kind
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Defines the C++ template declaration subclasses.
Defines the ExceptionSpecificationType enumeration and various utility functions.
Defines enumerations for expression traits intrinsics.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Defines several types used to describe C++ lambda expressions that are shared between the parser and ...
Defines the clang::LangOptions interface.
Defines an enumeration for C++ overloaded operators.
Defines the clang::SourceLocation class and associated facilities.
Defines various enumerations that describe declaration and type specifiers.
static QualType getPointeeType(const MemRegion *R)
Defines the clang::TemplateNameKind enum.
Defines enumerations for the type traits support.
C Language Family Type Representation.
__device__ __2f16 float __ockl_bool s
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Reads an AST files chain containing the contents of a translation unit.
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent.
ArrayTypeTraitExpr(SourceLocation loc, ArrayTypeTrait att, TypeSourceInfo *queried, uint64_t value, Expr *dimension, SourceLocation rparen, QualType ty)
uint64_t getValue() const
SourceLocation getEndLoc() const LLVM_READONLY
ArrayTypeTrait getTrait() const
QualType getQueriedType() const
Expr * getDimensionExpression() const
ArrayTypeTraitExpr(EmptyShell Empty)
const_child_range children() const
static bool classof(const Stmt *T)
TypeSourceInfo * getQueriedTypeSourceInfo() const
SourceLocation getBeginLoc() const LLVM_READONLY
StringRef getOpcodeStr() const
Represents a C++2a __builtin_bit_cast(T, v) expression.
static bool classof(const Stmt *T)
SourceLocation getEndLoc() const LLVM_READONLY
BuiltinBitCastExpr(EmptyShell Empty)
BuiltinBitCastExpr(QualType T, ExprValueKind VK, CastKind CK, Expr *SrcExpr, TypeSourceInfo *DstType, SourceLocation KWLoc, SourceLocation RParenLoc)
SourceLocation getBeginLoc() const LLVM_READONLY
Represents a call to a CUDA kernel function.
const CallExpr * getConfig() const
static CUDAKernelCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty)
static bool classof(const Stmt *T)
A C++ addrspace_cast expression (currently only enabled for OpenCL).
static bool classof(const Stmt *T)
static CXXAddrspaceCastExpr * CreateEmpty(const ASTContext &Context)
Represents binding an expression to a temporary.
CXXBindTemporaryExpr(EmptyShell Empty)
static bool classof(const Stmt *T)
void setTemporary(CXXTemporary *T)
const_child_range children() const
CXXTemporary * getTemporary()
const CXXTemporary * getTemporary() const
const Expr * getSubExpr() const
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getBeginLoc() const LLVM_READONLY
A boolean literal, per ([C++ lex.bool] Boolean literals).
const_child_range children() const
CXXBoolLiteralExpr(bool Val, QualType Ty, SourceLocation Loc)
SourceLocation getEndLoc() const
static bool classof(const Stmt *T)
static CXXBoolLiteralExpr * Create(const ASTContext &C, bool Val, QualType Ty, SourceLocation Loc)
CXXBoolLiteralExpr(EmptyShell Empty)
SourceLocation getBeginLoc() const
SourceLocation getLocation() const
void setLocation(SourceLocation L)
A C++ const_cast expression (C++ [expr.const.cast]).
static bool classof(const Stmt *T)
static CXXConstCastExpr * CreateEmpty(const ASTContext &Context)
Represents a call to a C++ constructor.
bool hasUnusedResultAttr(const ASTContext &Ctx) const
Returns true if this call expression should warn on unused results.
SourceRange getParenOrBraceRange() const
const_arg_iterator arg_end() const
void setStdInitListInitialization(bool V)
void setConstructionKind(CXXConstructionKind CK)
void setIsImmediateEscalating(bool Set)
llvm::iterator_range< arg_iterator > arg_range
bool isElidable() const
Whether this construction is elidable.
bool hadMultipleCandidates() const
Whether the referred constructor was resolved from an overloaded set having size greater than 1.
std::pair< const NamedDecl *, const WarnUnusedResultAttr * > getUnusedResultAttr(const ASTContext &Ctx) const
Returns the WarnUnusedResultAttr that is declared on the callee or its return type declaration,...
Expr * getArg(unsigned Arg)
Return the specified argument.
bool isStdInitListInitialization() const
Whether this constructor call was written as list-initialization, but was interpreted as forming a st...
void setListInitialization(bool V)
bool isImmediateEscalating() const
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called.
void setRequiresZeroInitialization(bool ZeroInit)
SourceLocation getLocation() const
const_arg_range arguments() const
static unsigned sizeOfTrailingObjects(unsigned NumArgs)
Return the size in bytes of the trailing objects.
void setArg(unsigned Arg, Expr *ArgExpr)
Set the specified argument.
SourceLocation getEndLoc() const LLVM_READONLY
llvm::iterator_range< const_arg_iterator > const_arg_range
SourceLocation getBeginLoc() const LLVM_READONLY
void setParenOrBraceRange(SourceRange Range)
const_arg_iterator arg_begin() const
const_child_range children() const
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
unsigned getNumArgs() const
Return the number of arguments to the constructor call.
CXXConstructionKind getConstructionKind() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
void setHadMultipleCandidates(bool V)
void setLocation(SourceLocation Loc)
const Expr * getArg(unsigned Arg) const
const Expr *const * getArgs() const
static bool classof(const Stmt *T)
static CXXConstructExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs)
Create an empty C++ construction expression.
Represents a C++ constructor within a class.
A default argument (C++ [dcl.fct.default]).
SourceLocation getEndLoc() const
const_child_range children() const
SourceLocation getBeginLoc() const
Default argument expressions have no representation in the source, so they have an empty source range...
SourceLocation getUsedLocation() const
Retrieve the location where this default argument was actually used.
const ParmVarDecl * getParam() const
const Expr * getExpr() const
Expr * getRewrittenExpr()
Expr * getAdjustedRewrittenExpr()
const Expr * getAdjustedRewrittenExpr() const
DeclContext * getUsedContext()
SourceLocation getExprLoc() const
const DeclContext * getUsedContext() const
const Expr * getRewrittenExpr() const
static bool classof(const Stmt *T)
static CXXDefaultArgExpr * CreateEmpty(const ASTContext &C, bool HasRewrittenInit)
bool hasRewrittenInit() const
A use of a default initializer in a constructor or in aggregate initialization.
static bool classof(const Stmt *T)
const DeclContext * getUsedContext() const
const FieldDecl * getField() const
const Expr * getRewrittenExpr() const
Retrieve the initializing expression with evaluated immediate calls, if any.
const Expr * getExpr() const
bool hasRewrittenInit() const
Expr * getExpr()
Get the initialization expression that will be used.
FieldDecl * getField()
Get the field whose initializer will be used.
static CXXDefaultInitExpr * CreateEmpty(const ASTContext &C, bool HasRewrittenInit)
Expr * getRewrittenExpr()
Retrieve the initializing expression with evaluated immediate calls, if any.
SourceLocation getBeginLoc() const
SourceLocation getEndLoc() const
const_child_range children() const
DeclContext * getUsedContext()
SourceLocation getUsedLocation() const
Retrieve the location where this default initializer expression was actually used.
Represents a delete expression for memory deallocation and destructor calls, e.g.
static bool classof(const Stmt *T)
FunctionDecl * getOperatorDelete() const
SourceLocation getEndLoc() const LLVM_READONLY
CXXDeleteExpr(EmptyShell Shell)
const_child_range children() const
SourceLocation getBeginLoc() const
const Expr * getArgument() const
bool isGlobalDelete() const
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
QualType getDestroyedType() const
Retrieve the type being destroyed.
bool isArrayFormAsWritten() const
CXXDeleteExpr(QualType Ty, bool GlobalDelete, bool ArrayForm, bool ArrayFormAsWritten, bool UsualArrayDeleteWantsSize, FunctionDecl *OperatorDelete, Expr *Arg, SourceLocation Loc)
Represents a C++ member access expression where the actual member referenced could not be resolved be...
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '.
SourceLocation getOperatorLoc() const
Retrieve the location of the '->' or '.' operator.
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the member name.
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding the member name, if any.
const DeclarationNameInfo & getMemberNameInfo() const
Retrieve the name of the member that this expression refers to.
SourceLocation getBeginLoc() const LLVM_READONLY
void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const
Copies the template arguments (if present) into the given structure.
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
const TemplateArgumentLoc * getTemplateArgs() const
Retrieve the template arguments provided as part of this template-id.
bool hasExplicitTemplateArgs() const
Determines whether this member expression actually had a C++ template argument list explicitly specif...
static CXXDependentScopeMemberExpr * CreateEmpty(const ASTContext &Ctx, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs, bool HasFirstQualifierFoundInScope)
SourceLocation getMemberLoc() const
static bool classof(const Stmt *T)
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
QualType getBaseType() const
DeclarationName getMember() const
Retrieve the name of the member that this expression refers to.
SourceLocation getEndLoc() const LLVM_READONLY
NamedDecl * getFirstQualifierFoundInScope() const
Retrieve the first part of the nested-name-specifier that was found in the scope of the member access...
Expr * getBase() const
Retrieve the base object of this member expressions, e.g., the x in x.m.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the member name, with source location information.
const_child_range children() const
bool hasTemplateKeyword() const
Determines whether the member name was preceded by the template keyword.
bool isImplicitAccess() const
True if this is an implicit access, i.e.
ArrayRef< TemplateArgumentLoc > template_arguments() const
Represents a C++ destructor within a class.
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
static bool classof(const Stmt *T)
static CXXDynamicCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
bool isAlwaysNull() const
isAlwaysNull - Return whether the result of the dynamic_cast is proven to always be null.
Represents a folding of a pack over an operator.
static bool classof(const Stmt *T)
SourceLocation getBeginLoc() const LLVM_READONLY
UnresolvedLookupExpr * getCallee() const
Expr * getInit() const
Get the operand that doesn't contain a pack, for a binary fold.
CXXFoldExpr(EmptyShell Empty)
SourceLocation getEndLoc() const LLVM_READONLY
const_child_range children() const
SourceLocation getLParenLoc() const
SourceLocation getEllipsisLoc() const
bool isLeftFold() const
Does this produce a left-associated sequence of operators?
UnsignedOrNone getNumExpansions() const
bool isRightFold() const
Does this produce a right-associated sequence of operators?
Expr * getPattern() const
Get the pattern, that is, the operand that contains an unexpanded pack.
SourceLocation getRParenLoc() const
BinaryOperatorKind getOperator() const
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr....
void setLParenLoc(SourceLocation L)
SourceLocation getLParenLoc() const
static CXXFunctionalCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize, bool HasFPFeatures)
SourceLocation getRParenLoc() const
SourceLocation getBeginLoc() const LLVM_READONLY
void setRParenLoc(SourceLocation L)
static bool classof(const Stmt *T)
bool isListInitialization() const
Determine whether this expression models list-initialization.
SourceLocation getEndLoc() const LLVM_READONLY
Represents a call to an inherited base class constructor from an inheriting constructor.
CXXInheritedCtorInitExpr(EmptyShell Empty)
Construct an empty C++ inheriting construction expression.
const_child_range children() const
CXXConstructionKind getConstructionKind() const
SourceLocation getBeginLoc() const LLVM_READONLY
static bool classof(const Stmt *T)
bool constructsVBase() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will call.
CXXInheritedCtorInitExpr(SourceLocation Loc, QualType T, CXXConstructorDecl *Ctor, bool ConstructsVirtualBase, bool InheritedFromVirtualBase)
Construct a C++ inheriting construction expression.
SourceLocation getLocation() const LLVM_READONLY
SourceLocation getEndLoc() const LLVM_READONLY
bool inheritedFromVBase() const
Determine whether the inherited constructor is inherited from a virtual base of the object we constru...
Represents a call to a member function that may be written either with member call syntax (e....
CXXMethodDecl * getMethodDecl() const
Retrieve the declaration of the called method.
Expr * getImplicitObjectArgument() const
Retrieve the implicit object argument for the member call.
static CXXMemberCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty)
QualType getObjectType() const
Retrieve the type of the object argument.
SourceLocation getExprLoc() const LLVM_READONLY
static bool classof(const Stmt *T)
CXXRecordDecl * getRecordDecl() const
Retrieve the CXXRecordDecl for the underlying type of the implicit object argument.
Represents a static or instance method of a struct/union/class.
Abstract class common to all of the C++ "named"/"keyword" casts.
SourceLocation getBeginLoc() const LLVM_READONLY
SourceLocation getOperatorLoc() const
Retrieve the location of the cast operator keyword, e.g., static_cast.
const char * getCastName() const
getCastName - Get the name of the C++ cast being used, e.g., "static_cast", "dynamic_cast",...
CXXNamedCastExpr(StmtClass SC, QualType ty, ExprValueKind VK, CastKind kind, Expr *op, unsigned PathSize, bool HasFPFeatures, TypeSourceInfo *writtenTy, SourceLocation l, SourceLocation RParenLoc, SourceRange AngleBrackets)
static bool classof(const Stmt *T)
CXXNamedCastExpr(StmtClass SC, EmptyShell Shell, unsigned PathSize, bool HasFPFeatures)
SourceRange getAngleBrackets() const LLVM_READONLY
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getRParenLoc() const
Retrieve the location of the closing parenthesis.
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
static CXXNewExpr * CreateEmpty(const ASTContext &Ctx, bool IsArray, bool HasInit, unsigned NumPlacementArgs, bool IsParenTypeId)
Create an empty c++ new expression.
SourceRange getDirectInitRange() const
llvm::iterator_range< arg_iterator > placement_arguments()
QualType getAllocatedType() const
unsigned getNumImplicitArgs() const
arg_iterator placement_arg_end()
std::optional< const Expr * > getArraySize() const
This might return std::nullopt even if isArray() returns true, since there might not be an array size...
const_arg_iterator placement_arg_begin() const
std::optional< Expr * > getArraySize()
This might return std::nullopt even if isArray() returns true, since there might not be an array size...
SourceLocation getEndLoc() const
CXXNewInitializationStyle getInitializationStyle() const
The kind of initializer this new-expression has.
ImplicitAllocationParameters implicitAllocationParameters() const
Provides the full set of information about expected implicit parameters in this call.
Expr * getPlacementArg(unsigned I)
bool hasInitializer() const
Whether this new-expression has any initializer at all.
const Expr * getInitializer() const
bool shouldNullCheckAllocation() const
True if the allocation result needs to be null-checked.
const Expr * getPlacementArg(unsigned I) const
static bool classof(const Stmt *T)
SourceLocation getBeginLoc() const
void setOperatorDelete(FunctionDecl *D)
bool passAlignment() const
Indicates whether the required alignment should be implicitly passed to the allocation function.
FunctionDecl * getOperatorDelete() const
unsigned getNumPlacementArgs() const
const CXXConstructExpr * getConstructExpr() const
Returns the CXXConstructExpr from this new-expression, or null.
llvm::iterator_range< const_arg_iterator > placement_arguments() const
const_arg_iterator placement_arg_end() const
TypeSourceInfo * getAllocatedTypeSourceInfo() const
SourceRange getSourceRange() const
SourceRange getTypeIdParens() const
Expr ** getPlacementArgs()
bool isParenTypeId() const
raw_arg_iterator raw_arg_end()
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
const_arg_iterator raw_arg_end() const
const_child_range children() const
arg_iterator placement_arg_begin()
raw_arg_iterator raw_arg_begin()
void setOperatorNew(FunctionDecl *D)
FunctionDecl * getOperatorNew() const
const_arg_iterator raw_arg_begin() const
Expr * getInitializer()
The initializer of this new-expression.
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
static bool classof(const Stmt *T)
const_child_range children() const
SourceLocation getEndLoc() const
Expr * getOperand() const
SourceLocation getBeginLoc() const
SourceRange getSourceRange() const
CXXNoexceptExpr(EmptyShell Empty)
CXXNoexceptExpr(QualType Ty, Expr *Operand, CanThrowResult Val, SourceLocation Keyword, SourceLocation RParen)
The null pointer literal (C++11 [lex.nullptr])
const_child_range children() const
CXXNullPtrLiteralExpr(EmptyShell Empty)
void setLocation(SourceLocation L)
SourceLocation getEndLoc() const
static bool classof(const Stmt *T)
CXXNullPtrLiteralExpr(QualType Ty, SourceLocation Loc)
SourceLocation getLocation() const
SourceLocation getBeginLoc() const
A call to an overloaded operator written using operator syntax.
bool isInfixBinaryOp() const
Is this written as an infix binary operator?
bool isAssignmentOp() const
static bool classof(const Stmt *T)
SourceLocation getOperatorLoc() const
Returns the location of the operator symbol in the expression.
SourceLocation getEndLoc() const
SourceLocation getExprLoc() const LLVM_READONLY
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
static CXXOperatorCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty)
SourceLocation getBeginLoc() const
static bool isComparisonOp(OverloadedOperatorKind Opc)
static bool isAssignmentOp(OverloadedOperatorKind Opc)
bool isComparisonOp() const
SourceRange getSourceRange() const
Represents a list-initialization with parenthesis.
ArrayRef< Expr * > getInitExprs() const
SourceRange getSourceRange() const LLVM_READONLY
const_child_range children() const
void setInitializedFieldInUnion(FieldDecl *FD)
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getInitLoc() const LLVM_READONLY
MutableArrayRef< Expr * > getInitExprs()
ArrayRef< Expr * > getUserSpecifiedInitExprs()
ArrayRef< Expr * > getUserSpecifiedInitExprs() const
CXXParenListInitExpr(EmptyShell Empty, unsigned NumExprs)
friend class TrailingObjects
static CXXParenListInitExpr * CreateEmpty(ASTContext &C, unsigned numExprs, EmptyShell Empty)
const FieldDecl * getInitializedFieldInUnion() const
SourceLocation getBeginLoc() const LLVM_READONLY
static bool classof(const Stmt *T)
FieldDecl * getInitializedFieldInUnion()
const Expr * getArrayFiller() const
void setArrayFiller(Expr *E)
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
TypeSourceInfo * getDestroyedTypeInfo() const
Retrieve the source location information for the type being destroyed.
SourceLocation getBeginLoc() const LLVM_READONLY
bool isArrow() const
Determine whether this pseudo-destructor expression was written using an '->' (otherwise,...
TypeSourceInfo * getScopeTypeInfo() const
Retrieve the scope type in a qualified pseudo-destructor expression.
static bool classof(const Stmt *T)
SourceLocation getTildeLoc() const
Retrieve the location of the '~'.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieves the nested-name-specifier that qualifies the type name, with source-location information.
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getDestroyedTypeLoc() const
Retrieve the starting location of the type being destroyed.
SourceLocation getColonColonLoc() const
Retrieve the location of the '::' in a qualified pseudo-destructor expression.
const_child_range children() const
QualType getDestroyedType() const
Retrieve the type being destroyed.
SourceLocation getOperatorLoc() const
Retrieve the location of the '.' or '->' operator.
NestedNameSpecifier getQualifier() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name.
void setDestroyedType(IdentifierInfo *II, SourceLocation Loc)
Set the name of destroyed type for a dependent pseudo-destructor expression.
const IdentifierInfo * getDestroyedTypeIdentifier() const
In a dependent pseudo-destructor expression for which we do not have full type information on the des...
void setDestroyedType(TypeSourceInfo *Info)
Set the destroyed type.
bool hasQualifier() const
Determines whether this member expression actually had a C++ nested-name-specifier prior to the name ...
CXXPseudoDestructorExpr(EmptyShell Shell)
Represents a C++ struct/union/class.
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
static bool classof(const Stmt *T)
static CXXReinterpretCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
A rewritten comparison expression that was originally written using operator syntax.
Expr * getSemanticForm()
Get an equivalent semantic form for this expression.
SourceLocation getOperatorLoc() const LLVM_READONLY
BinaryOperatorKind getOperator() const
bool isComparisonOp() const
SourceLocation getEndLoc() const LLVM_READONLY
SourceRange getSourceRange() const LLVM_READONLY
bool isReversed() const
Determine whether this expression was rewritten in reverse form.
CXXRewrittenBinaryOperator(Expr *SemanticForm, bool IsReversed)
const Expr * getLHS() const
StringRef getOpcodeStr() const
CXXRewrittenBinaryOperator(EmptyShell Empty)
SourceLocation getBeginLoc() const LLVM_READONLY
Compute the begin and end locations from the decomposed form.
SourceLocation getExprLoc() const LLVM_READONLY
const Expr * getRHS() const
static bool classof(const Stmt *T)
BinaryOperatorKind getOpcode() const
bool isAssignmentOp() const
static StringRef getOpcodeStr(BinaryOperatorKind Op)
DecomposedForm getDecomposedForm() const LLVM_READONLY
Decompose this operator into its syntactic form.
const Expr * getSemanticForm() const
An expression "T()" which creates an rvalue of a non-class type T.
CXXScalarValueInitExpr(EmptyShell Shell)
const_child_range children() const
TypeSourceInfo * getTypeSourceInfo() const
SourceLocation getBeginLoc() const LLVM_READONLY
static bool classof(const Stmt *T)
SourceLocation getEndLoc() const
SourceLocation getRParenLoc() const
CXXScalarValueInitExpr(QualType Type, TypeSourceInfo *TypeInfo, SourceLocation RParenLoc)
Create an explicitly-written scalar-value initialization expression.
A C++ static_cast expression (C++ [expr.static.cast]).
static CXXStaticCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize, bool hasFPFeatures)
static bool classof(const Stmt *T)
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
SourceRange getSourceRange() const LLVM_READONLY
Retrieve the source range of the expression.
const_child_range children() const
CXXStdInitializerListExpr(QualType Ty, Expr *SubExpr)
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getBeginLoc() const LLVM_READONLY
const Expr * getSubExpr() const
static bool classof(const Stmt *S)
Represents a C++ functional cast expression that builds a temporary object.
TypeSourceInfo * getTypeSourceInfo() const
SourceLocation getEndLoc() const LLVM_READONLY
static CXXTemporaryObjectExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs)
static bool classof(const Stmt *T)
SourceLocation getBeginLoc() const LLVM_READONLY
Represents a C++ temporary.
const CXXDestructorDecl * getDestructor() const
void setDestructor(const CXXDestructorDecl *Dtor)
Represents the this expression in C++.
void setCapturedByCopyInLambdaWithExplicitObjectParameter(bool Set)
SourceLocation getBeginLoc() const
void setLocation(SourceLocation L)
SourceLocation getEndLoc() const
bool isCapturedByCopyInLambdaWithExplicitObjectParameter() const
static CXXThisExpr * CreateEmpty(const ASTContext &Ctx)
static bool classof(const Stmt *T)
const_child_range children() const
SourceLocation getLocation() const
A C++ throw-expression (C++ [except.throw]).
CXXThrowExpr(EmptyShell Empty)
const_child_range children() const
SourceLocation getEndLoc() const LLVM_READONLY
const Expr * getSubExpr() const
CXXThrowExpr(Expr *Operand, QualType Ty, SourceLocation Loc, bool IsThrownVariableInScope)
SourceLocation getThrowLoc() const
SourceLocation getBeginLoc() const
bool isThrownVariableInScope() const
Determines whether the variable thrown by this expression (if any!) is within the innermost try block...
static bool classof(const Stmt *T)
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
CXXTypeidExpr(QualType Ty, Expr *Operand, SourceRange R)
static bool classof(const Stmt *T)
CXXTypeidExpr(QualType Ty, TypeSourceInfo *Operand, SourceRange R)
bool isTypeOperand() const
QualType getTypeOperand(const ASTContext &Context) const
Retrieves the type operand of this typeid() expression after various required adjustments (removing r...
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
SourceLocation getBeginLoc() const LLVM_READONLY
Expr * getExprOperand() const
SourceRange getSourceRange() const LLVM_READONLY
bool isMostDerived(const ASTContext &Context) const
Best-effort check if the expression operand refers to a most derived object.
void setSourceRange(SourceRange R)
const_child_range children() const
SourceLocation getEndLoc() const LLVM_READONLY
bool isPotentiallyEvaluated() const
Determine whether this typeid has a type operand which is potentially evaluated, per C++11 [expr....
CXXTypeidExpr(EmptyShell Empty, bool isExpr)
bool hasNullCheck() const
Whether this is of a form like "typeid(*ptr)" that can throw a std::bad_typeid if a pointer is a null...
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
const_child_range children() const
const Expr *const * const_arg_iterator
void setRParenLoc(SourceLocation L)
void setArg(unsigned I, Expr *E)
SourceLocation getLParenLoc() const
Retrieve the location of the left parentheses ('(') that precedes the argument list.
bool isListInitialization() const
Determine whether this expression models list-initialization.
TypeSourceInfo * getTypeSourceInfo() const
Retrieve the type source information for the type being constructed.
const_arg_range arguments() const
QualType getTypeAsWritten() const
Retrieve the type that is being constructed, as specified in the source code.
const_arg_iterator arg_end() const
SourceLocation getEndLoc() const LLVM_READONLY
llvm::iterator_range< const_arg_iterator > const_arg_range
void setLParenLoc(SourceLocation L)
const Expr * getArg(unsigned I) const
Expr * getArg(unsigned I)
SourceLocation getRParenLoc() const
Retrieve the location of the right parentheses (')') that follows the argument list.
SourceLocation getBeginLoc() const LLVM_READONLY
unsigned getNumArgs() const
Retrieve the number of arguments.
static bool classof(const Stmt *T)
static CXXUnresolvedConstructExpr * CreateEmpty(const ASTContext &Context, unsigned NumArgs)
llvm::iterator_range< arg_iterator > arg_range
const_arg_iterator arg_begin() const
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
SourceLocation getBeginLoc() const LLVM_READONLY
static bool classof(const Stmt *T)
const_child_range children() const
Expr * getExprOperand() const
CXXUuidofExpr(QualType Ty, TypeSourceInfo *Operand, MSGuidDecl *Guid, SourceRange R)
MSGuidDecl * getGuidDecl() const
QualType getTypeOperand(ASTContext &Context) const
Retrieves the type operand of this __uuidof() expression after various required adjustments (removing...
bool isTypeOperand() const
CXXUuidofExpr(QualType Ty, Expr *Operand, MSGuidDecl *Guid, SourceRange R)
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
void setSourceRange(SourceRange R)
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation getEndLoc() const LLVM_READONLY
CXXUuidofExpr(EmptyShell Empty, bool isExpr)
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Expr * getArg(unsigned Arg)
getArg - Return the specified argument.
static constexpr ADLCallKind NotADL
SourceLocation getBeginLoc() const
SourceLocation getRParenLoc() const
static constexpr ADLCallKind UsesADL
Stmt * getPreArg(unsigned I)
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
FPOptionsOverride * getTrailingFPFeatures()
Return a pointer to the trailing FPOptions.
unsigned path_size() const
bool hasStoredFPFeatures() const
Represents a 'co_await' expression.
void setIsImplicit(bool value=true)
static bool classof(const Stmt *T)
CoawaitExpr(EmptyShell Empty)
CoawaitExpr(SourceLocation CoawaitLoc, QualType Ty, Expr *Operand, Expr *Common, bool IsImplicit=false)
CoawaitExpr(SourceLocation CoawaitLoc, Expr *Operand, Expr *Common, Expr *Ready, Expr *Suspend, Expr *Resume, OpaqueValueExpr *OpaqueValue, bool IsImplicit=false)
CompoundStmt - This represents a group of statements like { stmt stmt }.
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
llvm::APSInt getResultAsAPSInt() const
Represents an expression that might suspend coroutine execution; either a co_await or co_yield expres...
SuspendReturnType getSuspendReturnType() const
CoroutineSuspendExpr(StmtClass SC, SourceLocation KeywordLoc, Expr *Operand, Expr *Common, Expr *Ready, Expr *Suspend, Expr *Resume, OpaqueValueExpr *OpaqueValue)
Expr * getReadyExpr() const
SourceLocation getKeywordLoc() const
Expr * getResumeExpr() const
SourceLocation getBeginLoc() const LLVM_READONLY
Expr * getSuspendExpr() const
CoroutineSuspendExpr(StmtClass SC, SourceLocation KeywordLoc, QualType Ty, Expr *Operand, Expr *Common)
static bool classof(const Stmt *T)
OpaqueValueExpr * getOpaqueValue() const
getOpaqueValue - Return the opaque value placeholder.
Expr * getCommonExpr() const
Expr * getOperand() const
const_child_range children() const
CoroutineSuspendExpr(StmtClass SC, EmptyShell Empty)
SourceLocation getEndLoc() const LLVM_READONLY
Represents a 'co_yield' expression.
CoyieldExpr(EmptyShell Empty)
CoyieldExpr(SourceLocation CoyieldLoc, Expr *Operand, Expr *Common, Expr *Ready, Expr *Suspend, Expr *Resume, OpaqueValueExpr *OpaqueValue)
static bool classof(const Stmt *T)
CoyieldExpr(SourceLocation CoyieldLoc, QualType Ty, Expr *Operand, Expr *Common)
A POD class for pairing a NamedDecl* with an access specifier.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Decl - This represents one declaration (or definition), e.g.
The name of a declaration.
Represents a 'co_await' expression while the type of the promise is dependent.
static bool classof(const Stmt *T)
DependentCoawaitExpr(EmptyShell Empty)
SourceLocation getEndLoc() const LLVM_READONLY
const_child_range children() const
Expr * getOperand() const
SourceLocation getBeginLoc() const LLVM_READONLY
DependentCoawaitExpr(SourceLocation KeywordLoc, QualType Ty, Expr *Op, UnresolvedLookupExpr *OpCoawait)
SourceLocation getKeywordLoc() const
UnresolvedLookupExpr * getOperatorCoawaitLookup() const
A qualified reference to a name whose declaration cannot yet be resolved.
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
static DependentScopeDeclRefExpr * CreateEmpty(const ASTContext &Context, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source location information.
SourceLocation getLocation() const
Retrieve the location of the name within the expression.
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
ArrayRef< TemplateArgumentLoc > template_arguments() const
const_child_range children() const
static bool classof(const Stmt *T)
bool hasExplicitTemplateArgs() const
Determines whether this lookup had explicit template arguments.
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getBeginLoc() const LLVM_READONLY
Note: getBeginLoc() is the start of the whole DependentScopeDeclRefExpr, and differs from getLocation...
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies this declaration.
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding this name, if any.
bool hasTemplateKeyword() const
Determines whether the name was preceded by the template keyword.
unsigned getNumTemplateArgs() const
DeclarationName getDeclName() const
Retrieve the name that this expression refers to.
TemplateArgumentLoc const * getTemplateArgs() const
void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const
Copies the template arguments (if present) into the given structure.
const DeclarationNameInfo & getNameInfo() const
Retrieve the name that this expression refers to.
ExplicitCastExpr - An explicit cast written in the source code.
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
bool cleanupsHaveSideEffects() const
static bool classof(const Stmt *T)
CleanupObject getObject(unsigned i) const
ArrayRef< CleanupObject > getObjects() const
unsigned getNumObjects() const
SourceLocation getEndLoc() const LLVM_READONLY
const_child_range children() const
llvm::PointerUnion< BlockDecl *, CompoundLiteralExpr * > CleanupObject
The type of objects that are kept in the cleanup.
SourceLocation getBeginLoc() const LLVM_READONLY
This represents one expression.
static std::pair< const NamedDecl *, const WarnUnusedResultAttr * > getUnusedResultAttrImpl(const Decl *Callee, QualType ReturnType)
Returns the WarnUnusedResultAttr that is declared on the callee or its return type declaration,...
bool isImplicitCXXThis() const
Whether this expression is an implicit reference to 'this' in C++.
bool isValueDependent() const
Determines whether the value of this expression depends on.
ExprValueKind getValueKind() const
getValueKind - The value kind that this expression produces.
bool isTypeDependent() const
Determines whether the type of this expression depends on.
bool containsUnexpandedParameterPack() const
Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates).
bool isLValue() const
isLValue - True if this expression is an "l-value" according to the rules of the current language.
ExprObjectKind getObjectKind() const
getObjectKind - The object kind that this expression produces.
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on.
void setValueKind(ExprValueKind Cat)
setValueKind - Set the value kind produced by this expression.
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
static ExprValueKind getValueKindForType(QualType T)
getValueKindForType - Given a formal return or parameter type, give its value kind.
void setDependence(ExprDependence Deps)
Each concrete expr subclass is expected to compute its dependence and call this in the constructor.
An expression trait intrinsic.
ExpressionTraitExpr(SourceLocation loc, ExpressionTrait et, Expr *queried, bool value, SourceLocation rparen, QualType resultType)
static bool classof(const Stmt *T)
ExpressionTraitExpr(EmptyShell Empty)
SourceLocation getBeginLoc() const LLVM_READONLY
Expr * getQueriedExpression() const
ExpressionTrait getTrait() const
SourceLocation getEndLoc() const LLVM_READONLY
const_child_range children() const
Represents difference between two FPOptions values.
bool requiresTrailingStorage() const
Represents a member of a struct/union/class.
FullExpr - Represents a "full-expression" node.
Represents a function declaration or definition.
Represents a reference to a function parameter pack, init-capture pack, or binding pack that has been...
const_child_range children() const
ValueDecl * getExpansion(unsigned I) const
Get an expansion of the parameter pack by index.
SourceLocation getEndLoc() const LLVM_READONLY
ValueDecl *const * iterator
Iterators over the parameters which the parameter pack expanded into.
ValueDecl * getParameterPack() const
Get the parameter pack which this expression refers to.
SourceLocation getBeginLoc() const LLVM_READONLY
unsigned getNumExpansions() const
Get the number of parameters in this parameter pack.
static bool classof(const Stmt *T)
SourceLocation getParameterPackLocation() const
Get the location of the parameter pack.
static FunctionParmPackExpr * CreateEmpty(const ASTContext &Context, unsigned NumParams)
Declaration of a template function.
One of these records is kept for each identifier that is lexed.
Describes the capture of a variable or of this, or of a C++1y init-capture.
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
llvm::iterator_range< const_capture_init_iterator > capture_inits() const
Retrieve the initialization expressions for this lambda's captures.
capture_iterator capture_begin() const
Retrieve an iterator pointing to the first lambda capture.
static LambdaExpr * CreateDeserialized(const ASTContext &C, unsigned NumCaptures)
Construct a new lambda expression that will be deserialized from an external source.
SourceLocation getEndLoc() const LLVM_READONLY
Stmt * getBody() const
Retrieve the body of the lambda.
bool hasExplicitParameters() const
Determine whether this lambda has an explicit parameter list vs.
const_capture_init_iterator capture_init_begin() const
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
bool isGenericLambda() const
Whether this is a generic lambda.
SourceRange getIntroducerRange() const
Retrieve the source range covering the lambda introducer, which contains the explicit capture list su...
bool isMutable() const
Determine whether the lambda is mutable, meaning that any captures values can be modified.
capture_iterator implicit_capture_end() const
Retrieve an iterator pointing past the end of the sequence of implicit lambda captures.
CompoundStmt * getCompoundStmtBody()
unsigned capture_size() const
Determine the number of captures in this lambda.
capture_range explicit_captures() const
Retrieve this lambda's explicit captures.
bool isInitCapture(const LambdaCapture *Capture) const
Determine whether one of this lambda's captures is an init-capture.
const_capture_init_iterator capture_init_end() const
Retrieve the iterator pointing one past the last initialization argument for this lambda expression.
CXXMethodDecl * getCallOperator() const
Retrieve the function call operator associated with this lambda expression.
const CompoundStmt * getCompoundStmtBody() const
Retrieve the CompoundStmt representing the body of the lambda.
bool hasExplicitResultType() const
Whether this lambda had its result type explicitly specified.
capture_range implicit_captures() const
Retrieve this lambda's implicit captures.
const AssociatedConstraint & getTrailingRequiresClause() const
Get the trailing requires clause, if any.
TemplateParameterList * getTemplateParameterList() const
If this is a generic lambda expression, retrieve the template parameter list associated with it,...
ArrayRef< NamedDecl * > getExplicitTemplateParameters() const
Get the template parameters were explicitly specified (as opposed to being invented by use of an auto...
capture_iterator implicit_capture_begin() const
Retrieve an iterator pointing to the first implicit lambda capture.
capture_iterator explicit_capture_end() const
Retrieve an iterator pointing past the end of the sequence of explicit lambda captures.
capture_iterator capture_end() const
Retrieve an iterator pointing past the end of the sequence of lambda captures.
llvm::iterator_range< capture_iterator > capture_range
An iterator over a range of lambda captures.
SourceLocation getCaptureDefaultLoc() const
Retrieve the location of this lambda's capture-default, if any.
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument for this lambda expression.
const LambdaCapture * capture_iterator
An iterator that walks over the captures of the lambda, both implicit and explicit.
Expr *const * const_capture_init_iterator
Const iterator that walks over the capture initialization arguments.
capture_iterator explicit_capture_begin() const
Retrieve an iterator pointing to the first explicit lambda capture.
llvm::iterator_range< capture_init_iterator > capture_inits()
Retrieve the initialization expressions for this lambda's captures.
child_range children()
Includes the captures and the body of the lambda.
FunctionTemplateDecl * getDependentCallOperator() const
Retrieve the function template call operator associated with this lambda expression.
SourceLocation getBeginLoc() const LLVM_READONLY
static bool classof(const Stmt *T)
capture_range captures() const
Retrieve this lambda's captures.
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
LambdaCaptureDefault getCaptureDefault() const
Determine the default capture kind for this lambda.
CXXRecordDecl * getLambdaClass() const
Retrieve the class that corresponds to the lambda.
Implicit declaration of a temporary that was materialized by a MaterializeTemporaryExpr and lifetime-...
An instance of this class represents the declaration of a property member.
A member reference to an MSPropertyDecl.
const_child_range children() const
NestedNameSpecifierLoc getQualifierLoc() const
MSPropertyRefExpr(EmptyShell Empty)
bool isImplicitAccess() const
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation getEndLoc() const
MSPropertyDecl * getPropertyDecl() const
Expr * getBaseExpr() const
MSPropertyRefExpr(Expr *baseExpr, MSPropertyDecl *decl, bool isArrow, QualType ty, ExprValueKind VK, NestedNameSpecifierLoc qualifierLoc, SourceLocation nameLoc)
static bool classof(const Stmt *T)
SourceLocation getBeginLoc() const
SourceLocation getMemberLoc() const
MS property subscript expression.
static bool classof(const Stmt *T)
const Expr * getIdx() const
void setRBracketLoc(SourceLocation L)
SourceLocation getEndLoc() const LLVM_READONLY
MSPropertySubscriptExpr(Expr *Base, Expr *Idx, QualType Ty, ExprValueKind VK, ExprObjectKind OK, SourceLocation RBracketLoc)
SourceLocation getExprLoc() const LLVM_READONLY
const_child_range children() const
MSPropertySubscriptExpr(EmptyShell Shell)
Create an empty array subscript expression.
const Expr * getBase() const
SourceLocation getBeginLoc() const LLVM_READONLY
SourceLocation getRBracketLoc() const
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
const LifetimeExtendedTemporaryDecl * getLifetimeExtendedTemporaryDecl() const
StorageDuration getStorageDuration() const
Retrieve the storage duration for the materialized temporary.
Expr * getSubExpr() const
Retrieve the temporary-generating subexpression whose value will be materialized into a glvalue.
APValue * getOrCreateValue(bool MayCreate) const
Get the storage for the constant value of a materialized temporary of static storage duration.
bool isBoundToLvalueReference() const
Determine whether this materialized temporary is bound to an lvalue reference; otherwise,...
ValueDecl * getExtendingDecl()
Get the declaration which triggered the lifetime-extension of this temporary, if any.
bool isUsableInConstantExpressions(const ASTContext &Context) const
Determine whether this temporary object is usable in constant expressions, as specified in C++20 [exp...
MaterializeTemporaryExpr(EmptyShell Empty)
LifetimeExtendedTemporaryDecl * getLifetimeExtendedTemporaryDecl()
void setExtendingDecl(ValueDecl *ExtendedBy, unsigned ManglingNumber)
SourceLocation getEndLoc() const LLVM_READONLY
const ValueDecl * getExtendingDecl() const
static bool classof(const Stmt *T)
SourceLocation getBeginLoc() const LLVM_READONLY
unsigned getManglingNumber() const
const_child_range children() const
This represents a decl that may have a name.
A C++ nested-name-specifier augmented with source location information.
NestedNameSpecifier getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
SourceLocation getBeginLoc() const
Retrieve the location of the beginning of this nested-name-specifier.
bool hasQualifier() const
Evaluates true when this nested-name-specifier location is non-empty.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class.
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr.
static bool classof(const Stmt *T)
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
bool isVarDeclReference() const
bool hasExplicitTemplateArgs() const
Determines whether this expression had explicit template arguments.
static FindResult find(Expr *E)
Finds the overloaded expression in the given expression E of OverloadTy.
NestedNameSpecifier getQualifier() const
Fetches the nested-name qualifier, if one was given.
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
const DeclarationNameInfo & getNameInfo() const
Gets the full name info.
const CXXRecordDecl * getNamingClass() const
SourceLocation getNameLoc() const
Gets the location of the name.
decls_iterator decls_begin() const
CXXRecordDecl * getNamingClass()
Gets the naming class of this lookup, if any.
unsigned getNumDecls() const
Gets the number of declarations in the unresolved set.
TemplateDecl * getTemplateDecl() const
TemplateTemplateParmDecl * getTemplateTemplateDecl() const
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding this name, if any.
NestedNameSpecifierLoc getQualifierLoc() const
Fetches the nested-name qualifier with source-location information, if one was given.
const ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo() const
TemplateArgumentLoc const * getTemplateArgs() const
llvm::iterator_range< decls_iterator > decls() const
void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const
Copies the template arguments into the given structure.
TemplateArgumentLoc * getTrailingTemplateArgumentLoc()
Return the optional template arguments.
DeclAccessPair * getTrailingResults()
Return the results. Defined after UnresolvedMemberExpr.
const DeclAccessPair * getTrailingResults() const
bool isConceptReference() const
bool hasTemplateKWAndArgsInfo() const
decls_iterator decls_end() const
unsigned getNumTemplateArgs() const
const TemplateArgumentLoc * getTrailingTemplateArgumentLoc() const
DeclarationName getName() const
Gets the name looked up.
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
bool hasTemplateKeyword() const
Determines whether the name was preceded by the template keyword.
ArrayRef< TemplateArgumentLoc > template_arguments() const
Represents a C++11 pack expansion that produces a sequence of expressions.
Expr * getPattern()
Retrieve the pattern of the pack expansion.
const Expr * getPattern() const
Retrieve the pattern of the pack expansion.
UnsignedOrNone getNumExpansions() const
Determine the number of expansions that will be produced when this pack expansion is instantiated,...
SourceLocation getBeginLoc() const LLVM_READONLY
SourceLocation getEndLoc() const LLVM_READONLY
PackExpansionExpr(Expr *Pattern, SourceLocation EllipsisLoc, UnsignedOrNone NumExpansions)
const_child_range children() const
SourceLocation getEllipsisLoc() const
Retrieve the location of the ellipsis that describes this pack expansion.
PackExpansionExpr(EmptyShell Empty)
static bool classof(const Stmt *T)
NamedDecl * getPackDecl() const
static PackIndexingExpr * CreateDeserialized(ASTContext &Context, unsigned NumTransformedExprs)
SourceLocation getEllipsisLoc() const
Determine the location of the 'sizeof' keyword.
Expr * getIndexExpr() const
ArrayRef< Expr * > getExpressions() const
Return the trailing expressions, regardless of the expansion.
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getPackLoc() const
Determine the location of the parameter pack.
SourceLocation getRSquareLoc() const
Determine the location of the right parenthesis.
bool expandsToEmptyPack() const
Determine if the expression was expanded to empty.
Expr * getPackIdExpression() const
Expr * getSelectedExpr() const
static bool classof(const Stmt *T)
bool isFullySubstituted() const
UnsignedOrNone getSelectedIndex() const
const_child_range children() const
SourceLocation getBeginLoc() const LLVM_READONLY
Represents a parameter to a function.
PointerType - C99 6.7.5.1 - Pointer Declarators.
Stores the type being destroyed by a pseudo-destructor expression.
PseudoDestructorTypeStorage(const IdentifierInfo *II, SourceLocation Loc)
const IdentifierInfo * getIdentifier() const
PseudoDestructorTypeStorage()=default
SourceLocation getLocation() const
TypeSourceInfo * getTypeSourceInfo() const
A (possibly-)qualified type.
Represents an expression that computes the length of a parameter pack.
SourceLocation getPackLoc() const
Determine the location of the parameter pack.
static bool classof(const Stmt *T)
SourceLocation getEndLoc() const LLVM_READONLY
static SizeOfPackExpr * CreateDeserialized(ASTContext &Context, unsigned NumPartialArgs)
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof... expression, such as is produced f...
const_child_range children() const
SourceLocation getBeginLoc() const LLVM_READONLY
ArrayRef< TemplateArgument > getPartialArguments() const
Get.
SourceLocation getOperatorLoc() const
Determine the location of the 'sizeof' keyword.
SourceLocation getRParenLoc() const
Determine the location of the right parenthesis.
NamedDecl * getPack() const
Retrieve the parameter pack.
unsigned getPackLength() const
Retrieve the length of the parameter pack.
Encodes a location in the source.
bool isValid() const
Return true if this is a valid SourceLocation object.
A trivial tuple used to represent a source range.
SourceLocation getEnd() const
Stmt - This represents one statement.
ExpressionTraitExprBitfields ExpressionTraitExprBits
SourceLocation getEndLoc() const LLVM_READONLY
CXXUnresolvedConstructExprBitfields CXXUnresolvedConstructExprBits
LambdaExprBitfields LambdaExprBits
UnresolvedLookupExprBitfields UnresolvedLookupExprBits
SubstNonTypeTemplateParmExprBitfields SubstNonTypeTemplateParmExprBits
CXXNoexceptExprBitfields CXXNoexceptExprBits
StmtIterator child_iterator
Child Iterators: All subclasses must implement 'children' to permit easy iteration over the substatem...
CXXRewrittenBinaryOperatorBitfields CXXRewrittenBinaryOperatorBits
ExprWithCleanupsBitfields ExprWithCleanupsBits
StmtClass getStmtClass() const
CXXScalarValueInitExprBitfields CXXScalarValueInitExprBits
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
OverloadExprBitfields OverloadExprBits
CXXConstructExprBitfields CXXConstructExprBits
CXXDependentScopeMemberExprBitfields CXXDependentScopeMemberExprBits
ConstCastIterator< Expr > ConstExprIterator
TypeTraitExprBitfields TypeTraitExprBits
CXXNewExprBitfields CXXNewExprBits
CXXNullPtrLiteralExprBitfields CXXNullPtrLiteralExprBits
CoawaitExprBitfields CoawaitBits
llvm::iterator_range< child_iterator > child_range
CXXFoldExprBitfields CXXFoldExprBits
CXXThrowExprBitfields CXXThrowExprBits
PackIndexingExprBitfields PackIndexingExprBits
ConstStmtIterator const_child_iterator
CXXBoolLiteralExprBitfields CXXBoolLiteralExprBits
CXXOperatorCallExprBitfields CXXOperatorCallExprBits
CXXDefaultInitExprBitfields CXXDefaultInitExprBits
DependentScopeDeclRefExprBitfields DependentScopeDeclRefExprBits
ArrayTypeTraitExprBitfields ArrayTypeTraitExprBits
SourceLocation getBeginLoc() const LLVM_READONLY
UnresolvedMemberExprBitfields UnresolvedMemberExprBits
llvm::iterator_range< const_child_iterator > const_child_range
CXXDeleteExprBitfields CXXDeleteExprBits
CXXDefaultArgExprBitfields CXXDefaultArgExprBits
CXXThisExprBitfields CXXThisExprBits
CastIterator< Expr > ExprIterator
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Decl * getAssociatedDecl() const
A template-like entity which owns the whole pattern being substituted.
UnsignedOrNone getPackIndex() const
SourceLocation getEndLoc() const
QualType getParameterType(const ASTContext &Ctx) const
Determine the substituted type of the template parameter.
const_child_range children() const
bool isReferenceParameter() const
unsigned getIndex() const
Returns the index of the replaced parameter in the associated declaration.
SubstNonTypeTemplateParmExpr(QualType Ty, ExprValueKind ValueKind, SourceLocation Loc, Expr *Replacement, Decl *AssociatedDecl, unsigned Index, UnsignedOrNone PackIndex, bool RefParam, bool Final)
SourceLocation getNameLoc() const
SourceLocation getBeginLoc() const
Expr * getReplacement() const
static bool classof(const Stmt *s)
NamedDecl * getParameter() const
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
SourceLocation getBeginLoc() const LLVM_READONLY
TemplateArgument getArgumentPack() const
Retrieve the template argument pack containing the substituted template arguments.
SourceLocation getParameterPackLocation() const
Retrieve the location of the parameter pack name.
const_child_range children() const
NonTypeTemplateParmDecl * getParameterPack() const
Retrieve the non-type template parameter pack being substituted.
Decl * getAssociatedDecl() const
A template-like entity which owns the whole pattern being substituted.
static bool classof(const Stmt *T)
unsigned getIndex() const
Returns the index of the replaced parameter in the associated declaration.
SourceLocation getEndLoc() const LLVM_READONLY
A convenient class for passing around template argument information.
Location wrapper for a TemplateArgument.
Represents a template argument.
The base class of all kinds of template declarations (e.g., class, function, etc.).
Stores a list of template parameters for a TemplateDecl and its derived classes.
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
A container of type source information.
QualType getType() const
Return the type wrapped by this type source info.
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
bool getBoolValue() const
ArrayRef< TypeSourceInfo * > getArgs() const
Retrieve the argument types.
SourceLocation getEndLoc() const LLVM_READONLY
TypeSourceInfo * getArg(unsigned I) const
Retrieve the Ith argument.
const_child_range children() const
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
static TypeTraitExpr * CreateDeserialized(const ASTContext &C, bool IsStoredAsBool, unsigned NumArgs)
TypeTrait getTrait() const
Determine which type trait this expression uses.
SourceLocation getBeginLoc() const LLVM_READONLY
const APValue & getAPValue() const
static bool classof(const Stmt *T)
bool isStoredAsBoolean() const
The base class of the type hierarchy.
const T * castAs() const
Member-template castAs<specific type>.
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
SourceLocation getBeginLoc() const LLVM_READONLY
const CXXRecordDecl * getNamingClass() const
CXXRecordDecl * getNamingClass()
Gets the 'naming class' (in the sense of C++0x [class.access.base]p5) of the lookup.
SourceLocation getEndLoc() const LLVM_READONLY
static UnresolvedLookupExpr * CreateEmpty(const ASTContext &Context, unsigned NumResults, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
static bool classof(const Stmt *T)
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
const_child_range children() const
Represents a C++ member access expression for which lookup produced a set of overloaded functions.
SourceLocation getEndLoc() const LLVM_READONLY
DeclarationName getMemberName() const
Retrieve the name of the member that this expression refers to.
QualType getBaseType() const
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '.
SourceLocation getOperatorLoc() const
Retrieve the location of the '->' or '.' operator.
bool hasUnresolvedUsing() const
Determine whether the lookup results contain an unresolved using declaration.
const Expr * getBase() const
const CXXRecordDecl * getNamingClass() const
SourceLocation getExprLoc() const LLVM_READONLY
Return the preferred location (the member name) for the arrow when diagnosing a problem with this exp...
Expr * getBase()
Retrieve the base object of this member expressions, e.g., the x in x.m.
static bool classof(const Stmt *T)
CXXRecordDecl * getNamingClass()
Retrieve the naming class of this lookup.
bool isImplicitAccess() const
True if this is an implicit access, i.e., one in which the member being accessed was not written in t...
const DeclarationNameInfo & getMemberNameInfo() const
Retrieve the full name info for the member that this expression refers to.
SourceLocation getBeginLoc() const LLVM_READONLY
static UnresolvedMemberExpr * CreateEmpty(const ASTContext &Context, unsigned NumResults, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
const_child_range children() const
SourceLocation getMemberLoc() const
Retrieve the location of the name of the member that this expression refers to.
UnresolvedSetIterator iterator
The iterator over UnresolvedSets.
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit....
LiteralOperatorKind getLiteralOperatorKind() const
Returns the kind of literal operator invocation which this expression represents.
const Expr * getCookedLiteral() const
const IdentifierInfo * getUDSuffix() const
Returns the ud-suffix specified for this literal.
static UserDefinedLiteral * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPOptions, EmptyShell Empty)
SourceLocation getEndLoc() const
Expr * getCookedLiteral()
If this is not a raw user-defined literal, get the underlying cooked literal (representing the litera...
SourceLocation getBeginLoc() const
SourceLocation getUDSuffixLoc() const
Returns the location of a ud-suffix in the expression.
LiteralOperatorKind
The kind of literal operator which is invoked.
@ LOK_String
operator "" X (const CharT *, size_t)
@ LOK_Raw
Raw form: operator "" X (const char *)
@ LOK_Floating
operator "" X (long double)
@ LOK_Integer
operator "" X (unsigned long long)
@ LOK_Template
Raw form: operator "" X<cs...> ()
@ LOK_Character
operator "" X (CharT)
static bool classof(const Stmt *S)
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
const internal::VariadicDynCastAllOfMatcher< Stmt, CastExpr > castExpr
Matches any cast nodes of Clang's AST.
The JSON file list parser is used to communicate input to InstallAPI.
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
ArrayTypeTrait
Names for the array type traits.
CanThrowResult
Possible results from evaluation of a noexcept expression.
AlignedAllocationMode alignedAllocationModeFromBool(bool IsAligned)
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
@ OK_Ordinary
An ordinary object is located at an address in memory.
ExprDependence computeDependence(FullExpr *E)
@ Create
'create' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
bool isAlignedAllocation(AlignedAllocationMode Mode)
StorageDuration
The storage duration for an object (per C++ [basic.stc]).
@ SD_FullExpression
Full-expression storage duration (for temporaries).
@ Result
The result type of a method or function.
@ Keyword
The name has been typo-corrected to a keyword.
bool isTypeAwareAllocation(TypeAwareAllocationMode Mode)
CastKind
CastKind - The kind of operation required for a conversion.
SizedDeallocationMode sizedDeallocationModeFromBool(bool IsSized)
@ TNK_Var_template
The name refers to a variable template whose specialization produces a variable.
@ TNK_Concept_template
The name refers to a concept.
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
@ VK_PRValue
A pr-value expression (in the C++11 taxonomy) produces a temporary value.
@ VK_LValue
An l-value expression is a reference to an object with independent storage.
const FunctionProtoType * T
bool isSizedDeallocation(SizedDeallocationMode Mode)
TypeAwareAllocationMode typeAwareAllocationModeFromBool(bool IsTypeAwareAllocation)
@ None
The alignment was not explicit in code.
@ Class
The "class" keyword introduces the elaborated-type-specifier.
TypeTrait
Names for traits that operate specifically on types.
CXXNewInitializationStyle
@ Parens
New-expression has a C++98 paren-delimited initializer.
@ Braces
New-expression has a C++11 list-initializer.
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
SourceLocation LAngleLoc
The source location of the left angle bracket ('<').
void copyInto(const TemplateArgumentLoc *ArgArray, TemplateArgumentListInfo &List) const
unsigned NumTemplateArgs
The number of template arguments in TemplateArgs.
SourceLocation RAngleLoc
The source location of the right angle bracket ('>').
SourceLocation TemplateKWLoc
The source location of the template keyword; this is used as part of the representation of qualified ...
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
SourceLocation getLoc() const
getLoc - Returns the main location of the declaration name.
DeclarationName getName() const
getName - Returns the embedded declaration name.
SourceLocation getBeginLoc() const
getBeginLoc - Retrieve the location of the first token.
SourceLocation getEndLoc() const LLVM_READONLY
ImplicitAllocationParameters(QualType AllocType, TypeAwareAllocationMode PassTypeIdentity, AlignedAllocationMode PassAlignment)
AlignedAllocationMode PassAlignment
ImplicitAllocationParameters(AlignedAllocationMode PassAlignment)
TypeAwareAllocationMode PassTypeIdentity
unsigned getNumImplicitArgs() const
unsigned getNumImplicitArgs() const
ImplicitDeallocationParameters(AlignedAllocationMode PassAlignment, SizedDeallocationMode PassSize)
TypeAwareAllocationMode PassTypeIdentity
SizedDeallocationMode PassSize
ImplicitDeallocationParameters(QualType DeallocType, TypeAwareAllocationMode PassTypeIdentity, AlignedAllocationMode PassAlignment, SizedDeallocationMode PassSize)
AlignedAllocationMode PassAlignment
bool IsAddressOfOperandWithParen
bool HasFormOfMemberPointer
Iterator for iterating over Stmt * arrays that contain only T *.
A placeholder type used to construct an empty shell of a type, that will be filled in later (e....
static constexpr UnsignedOrNone fromInternalRepresentation(unsigned Rep)