14 #ifndef LLVM_CLANG_AST_EXPRCXX_H 15 #define LLVM_CLANG_AST_EXPRCXX_H 37 #include "llvm/ADT/ArrayRef.h" 38 #include "llvm/ADT/None.h" 39 #include "llvm/ADT/Optional.h" 40 #include "llvm/ADT/PointerUnion.h" 41 #include "llvm/ADT/StringRef.h" 42 #include "llvm/ADT/iterator_range.h" 43 #include "llvm/Support/Casting.h" 44 #include "llvm/Support/Compiler.h" 45 #include "llvm/Support/TrailingObjects.h" 57 class NonTypeTemplateParmDecl;
58 class TemplateParameterList;
86 SourceRange getSourceRangeImpl() const LLVM_READONLY;
112 return Opc == OO_Equal || Opc == OO_StarEqual || Opc == OO_SlashEqual ||
113 Opc == OO_PercentEqual || Opc == OO_PlusEqual ||
114 Opc == OO_MinusEqual || Opc == OO_LessLessEqual ||
115 Opc == OO_GreaterGreaterEqual || Opc == OO_AmpEqual ||
116 Opc == OO_CaretEqual || Opc == OO_PipeEqual;
132 return (Operator < OO_Plus || Operator >= OO_Arrow ||
133 Operator == OO_PlusPlus || Operator == OO_MinusMinus)
177 CXXMemberCallExpr(
unsigned NumArgs,
EmptyShell Empty);
183 unsigned MinNumArgs = 0);
191 Expr *getImplicitObjectArgument()
const;
226 enum { CONFIG, END_PREARG };
233 unsigned MinNumArgs);
247 return cast_or_null<CallExpr>(
getPreArg(CONFIG));
282 RParenLoc(RParenLoc), AngleBrackets(AngleBrackets) {}
303 case CXXStaticCastExprClass:
304 case CXXDynamicCastExprClass:
305 case CXXReinterpretCastExprClass:
306 case CXXConstCastExprClass:
326 writtenTy, l, RParenLoc, AngleBrackets) {}
328 explicit CXXStaticCastExpr(
EmptyShell Empty,
unsigned PathSize)
362 writtenTy, l, RParenLoc, AngleBrackets) {}
364 explicit CXXDynamicCastExpr(
EmptyShell Empty,
unsigned pathSize)
381 bool isAlwaysNull()
const;
399 CXXBaseSpecifier *> {
401 Expr *op,
unsigned pathSize,
406 pathSize, writtenTy, l, RParenLoc, AngleBrackets) {}
408 CXXReinterpretCastExpr(
EmptyShell Empty,
unsigned pathSize)
425 return T->
getStmtClass() == CXXReinterpretCastExprClass;
443 0, writtenTy, l, RParenLoc, AngleBrackets) {}
526 Expr *getCookedLiteral();
532 if (getLiteralOperatorKind() == LOK_Template)
564 :
Expr(CXXBoolLiteralExprClass, Empty) {}
601 :
Expr(CXXNullPtrLiteralExprClass, Empty) {}
625 Stmt *SubExpr =
nullptr;
628 :
Expr(CXXStdInitializerListExprClass, Empty) {}
658 return S->
getStmtClass() == CXXStdInitializerListExprClass;
675 llvm::PointerUnion<Stmt *, TypeSourceInfo *> Operand;
685 Operand->
getType()->isDependentType(),
686 Operand->
getType()->isInstantiationDependentType(),
688 Operand(Operand), Range(R) {}
699 Operand(Operand), Range(R) {}
702 :
Expr(CXXTypeidExprClass, Empty) {
704 Operand = (
Expr*)
nullptr;
711 bool isPotentiallyEvaluated()
const;
721 assert(isTypeOperand() &&
"Cannot call getTypeOperand for typeid(expr)");
726 assert(isTypeOperand() &&
"Cannot call getTypeOperand for typeid(expr)");
731 assert(!isTypeOperand() &&
"Cannot call getExprOperand for typeid(type)");
732 return static_cast<Expr*
>(Operand.get<
Stmt *>());
736 assert(!isTypeOperand() &&
"Cannot call getExprOperand for typeid(type)");
753 auto **begin =
reinterpret_cast<Stmt **
>(&Operand);
790 BaseExpr(baseExpr), TheDecl(decl),
791 MemberLoc(nameLoc), IsArrow(isArrow),
792 QualifierLoc(qualifierLoc) {}
801 return getBaseExpr() && getBaseExpr()->isImplicitCXXThis();
805 if (!isImplicitAccess())
807 else if (QualifierLoc)
849 enum { BASE_EXPR, IDX_EXPR, NUM_SUBEXPRS = 2 };
851 Stmt *SubExprs[NUM_SUBEXPRS];
854 void setBase(
Expr *
Base) { SubExprs[BASE_EXPR] = Base; }
855 void setIdx(
Expr *Idx) { SubExprs[IDX_EXPR] = Idx; }
863 RBracketLoc(RBracketLoc) {
864 SubExprs[BASE_EXPR] = Base;
865 SubExprs[IDX_EXPR] = Idx;
870 :
Expr(MSPropertySubscriptExprClass, Shell) {}
873 const Expr *
getBase()
const {
return cast<Expr>(SubExprs[BASE_EXPR]); }
876 const Expr *
getIdx()
const {
return cast<Expr>(SubExprs[IDX_EXPR]); }
879 return getBase()->getBeginLoc();
888 return getBase()->getExprLoc();
892 return T->
getStmtClass() == MSPropertySubscriptExprClass;
897 return child_range(&SubExprs[0], &SubExprs[0] + NUM_SUBEXPRS);
911 llvm::PointerUnion<Stmt *, TypeSourceInfo *> Operand;
919 Operand->
getType()->isDependentType(),
920 Operand->
getType()->isInstantiationDependentType(),
922 Operand(Operand), UuidStr(UuidStr), Range(R) {}
928 Operand(Operand), UuidStr(UuidStr), Range(R) {}
931 :
Expr(CXXUuidofExprClass, Empty) {
933 Operand = (
Expr*)
nullptr;
946 assert(isTypeOperand() &&
"Cannot call getTypeOperand for __uuidof(expr)");
951 assert(isTypeOperand() &&
"Cannot call getTypeOperand for __uuidof(expr)");
956 assert(!isTypeOperand() &&
"Cannot call getExprOperand for __uuidof(type)");
957 return static_cast<Expr*
>(Operand.get<
Stmt *>());
961 assert(!isTypeOperand() &&
"Cannot call getExprOperand for __uuidof(type)");
981 auto **begin =
reinterpret_cast<Stmt **
>(&Operand);
1012 Ty->isDependentType(), Ty->isDependentType(),
1013 Ty->isInstantiationDependentType(),
1061 bool IsThrownVariableInScope)
1088 return getThrowLoc();
1089 return getSubExpr()->getEndLoc();
1098 return child_range(&Operand, Operand ? &Operand + 1 : &Operand);
1123 Param->hasUnparsedDefaultArg()
1124 ? Param->
getType().getNonReferenceType()
1125 : Param->getDefaultArg()->
getType(),
1129 Param(Param), UsedContext(UsedContext) {
1255 : Destructor(destructor) {}
1284 Stmt *SubExpr =
nullptr;
1287 :
Expr(CXXBindTemporaryExprClass, SubExpr->
getType(),
1292 Temp(temp), SubExpr(SubExpr) {}
1296 :
Expr(CXXBindTemporaryExprClass, Empty) {}
1367 inline Stmt **getTrailingArgs();
1368 const Stmt *
const *getTrailingArgs()
const {
1377 bool ListInitialization,
bool StdInitListInitialization,
1387 return NumArgs *
sizeof(
Stmt *);
1395 bool HadMultipleCandidates,
bool ListInitialization,
1396 bool StdInitListInitialization,
bool ZeroInitialization,
1475 return reinterpret_cast<const Expr *
const *
>(getTrailingArgs());
1483 assert(Arg <
getNumArgs() &&
"Arg access out of range!");
1487 assert(Arg <
getNumArgs() &&
"Arg access out of range!");
1493 assert(Arg <
getNumArgs() &&
"Arg access out of range!");
1530 unsigned ConstructsVirtualBase : 1;
1534 unsigned InheritedFromVirtualBase : 1;
1542 bool InheritedFromVirtualBase)
1545 Constructor(Ctor), Loc(Loc),
1546 ConstructsVirtualBase(ConstructsVirtualBase),
1547 InheritedFromVirtualBase(InheritedFromVirtualBase) {
1553 :
Expr(CXXInheritedCtorInitExprClass, Empty),
1554 ConstructsVirtualBase(
false), InheritedFromVirtualBase(
false) {}
1578 return T->
getStmtClass() == CXXInheritedCtorInitExprClass;
1608 castExpr, pathSize, writtenTy),
1609 LParenLoc(lParenLoc), RParenLoc(rParenLoc) {}
1640 return T->
getStmtClass() == CXXFunctionalCastExprClass;
1671 bool HadMultipleCandidates,
bool ListInitialization,
1672 bool StdInitListInitialization,
1673 bool ZeroInitialization);
1681 SourceRange ParenOrBraceRange,
bool HadMultipleCandidates,
1682 bool ListInitialization,
bool StdInitListInitialization,
1683 bool ZeroInitialization);
1694 return T->
getStmtClass() == CXXTemporaryObjectExprClass;
1698 Stmt **CXXConstructExpr::getTrailingArgs() {
1699 if (
auto *E = dyn_cast<CXXTemporaryObjectExpr>(
this))
1700 return reinterpret_cast<Stmt **
>(E + 1);
1702 "Unexpected class deriving from CXXConstructExpr!");
1703 return reinterpret_cast<Stmt **
>(
this + 1);
1736 unsigned NumCaptures : 16;
1740 unsigned CaptureDefault : 2;
1744 unsigned ExplicitParams : 1;
1747 unsigned ExplicitResultType : 1;
1763 bool ExplicitParams,
bool ExplicitResultType,
1765 bool ContainsUnexpandedParameterPack);
1769 :
Expr(LambdaExprClass, Empty), NumCaptures(NumCaptures),
1770 CaptureDefault(
LCD_None), ExplicitParams(
false),
1771 ExplicitResultType(
false) {
1772 getStoredStmts()[NumCaptures] =
nullptr;
1775 Stmt **getStoredStmts() {
return getTrailingObjects<Stmt *>(); }
1777 Stmt *
const *getStoredStmts()
const {
return getTrailingObjects<Stmt *>(); }
1790 SourceLocation ClosingBrace,
bool ContainsUnexpandedParameterPack);
1795 unsigned NumCaptures);
1804 return CaptureDefaultLoc;
1862 return llvm::make_range(capture_init_begin(), capture_init_end());
1867 return llvm::make_range(capture_init_begin(), capture_init_end());
1873 return reinterpret_cast<Expr **
>(getStoredStmts());
1879 return reinterpret_cast<Expr *
const *
>(getStoredStmts());
1885 return capture_init_begin() + NumCaptures;
1891 return capture_init_begin() + NumCaptures;
1926 bool isMutable()
const;
1947 return child_range(getStoredStmts(), getStoredStmts() + NumCaptures + 1);
1952 getStoredStmts() + NumCaptures + 1);
1969 false, Type->isInstantiationDependentType(),
1971 TypeInfo(TypeInfo) {
1976 :
Expr(CXXScalarValueInitExprClass, Shell) {}
1990 return T->
getStmtClass() == CXXScalarValueInitExprClass;
2042 unsigned arraySizeOffset()
const {
return 0; }
2043 unsigned initExprOffset()
const {
return arraySizeOffset() + isArray(); }
2044 unsigned placementNewArgsOffset()
const {
2045 return initExprOffset() + hasInitializer();
2048 unsigned numTrailingObjects(OverloadToken<Stmt *>)
const {
2049 return isArray() + hasInitializer() + getNumPlacementArgs();
2052 unsigned numTrailingObjects(OverloadToken<SourceRange>)
const {
2053 return isParenTypeId();
2071 FunctionDecl *OperatorDelete,
bool ShouldPassAlignment,
2080 bool IsParenTypeId);
2086 FunctionDecl *OperatorDelete,
bool ShouldPassAlignment,
2095 bool HasInit,
unsigned NumPlacementArgs,
2096 bool IsParenTypeId);
2099 assert(
getType()->isPointerType());
2104 return AllocatedTypeInfo;
2122 bool shouldNullCheckAllocation()
const;
2134 return cast_or_null<Expr>(getTrailingObjects<Stmt *>()[arraySizeOffset()]);
2139 return cast_or_null<Expr>(getTrailingObjects<Stmt *>()[arraySizeOffset()]);
2147 return reinterpret_cast<Expr **
>(getTrailingObjects<Stmt *>() +
2148 placementNewArgsOffset());
2152 assert((I < getNumPlacementArgs()) &&
"Index out of range!");
2153 return getPlacementArgs()[I];
2156 return const_cast<CXXNewExpr *
>(
this)->getPlacementArg(I);
2161 return isParenTypeId() ? getTrailingObjects<SourceRange>()[0]
2182 return hasInitializer()
2183 ? cast<Expr>(getTrailingObjects<Stmt *>()[initExprOffset()])
2187 return hasInitializer()
2188 ? cast<Expr>(getTrailingObjects<Stmt *>()[initExprOffset()])
2194 return dyn_cast_or_null<CXXConstructExpr>(getInitializer());
2212 return llvm::make_range(placement_arg_begin(), placement_arg_end());
2216 return llvm::make_range(placement_arg_begin(), placement_arg_end());
2220 return getTrailingObjects<Stmt *>() + placementNewArgsOffset();
2223 return placement_arg_begin() + getNumPlacementArgs();
2226 return getTrailingObjects<Stmt *>() + placementNewArgsOffset();
2229 return placement_arg_begin() + getNumPlacementArgs();
2236 return raw_arg_begin() + numTrailingObjects(OverloadToken<Stmt *>());
2239 return getTrailingObjects<Stmt *>();
2242 return raw_arg_begin() + numTrailingObjects(OverloadToken<Stmt *>());
2272 Stmt *Argument =
nullptr;
2276 bool ArrayFormAsWritten,
bool UsualArrayDeleteWantsSize,
2281 OperatorDelete(OperatorDelete), Argument(Arg) {
2337 llvm::PointerUnion<TypeSourceInfo *, IdentifierInfo *>
Type;
2346 : Type(II), Location(Loc) {}
2426 :
Expr(CXXPseudoDestructorExprClass, Shell), IsArrow(
false) {}
2514 return T->
getStmtClass() == CXXPseudoDestructorExprClass;
2552 size_t numTrailingObjects(OverloadToken<TypeSourceInfo *>)
const {
2586 assert(I <
getNumArgs() &&
"Argument out-of-range");
2592 return llvm::makeArrayRef(getTrailingObjects<TypeSourceInfo *>(),
2648 (queried->
getType()->isInstantiationDependentType() ||
2651 ATT(att), Value(value), Dimension(dimension),
2652 Loc(loc), RParen(rparen), QueriedType(queried) {}
2655 :
Expr(ArrayTypeTraitExprClass, Empty), ATT(0) {}
2705 Expr* QueriedExpression =
nullptr;
2711 Expr *queried,
bool value,
2719 ET(et),
Value(value), Loc(loc), RParen(rparen),
2720 QueriedExpression(queried) {}
2767 bool KnownDependent,
bool KnownInstantiationDependent,
2768 bool KnownContainsUnexpandedParameterPack);
2771 bool HasTemplateKWAndArgsInfo);
2776 return const_cast<OverloadExpr *
>(
this)->getTrailingResults();
2784 ->getTrailingASTTemplateKWAndArgsInfo();
2791 return const_cast<OverloadExpr *
>(
this)->getTrailingTemplateArgumentLoc();
2816 if (isa<UnaryOperator>(E)) {
2817 assert(cast<UnaryOperator>(E)->getOpcode() == UO_AddrOf);
2818 E = cast<UnaryOperator>(E)->getSubExpr();
2821 Result.HasFormOfMemberPointer = (E == Ovl && Ovl->getQualifier());
2822 Result.IsAddressOfOperand =
true;
2823 Result.Expression = Ovl;
2825 Result.HasFormOfMemberPointer =
false;
2826 Result.IsAddressOfOperand =
false;
2827 Result.Expression = cast<OverloadExpr>(E);
2837 return const_cast<OverloadExpr *
>(
this)->getNamingClass();
2848 llvm::iterator_range<decls_iterator>
decls()
const {
2849 return llvm::make_range(decls_begin(), decls_end());
2876 if (!hasTemplateKWAndArgsInfo())
2878 return getTrailingASTTemplateKWAndArgsInfo()->
TemplateKWLoc;
2884 if (!hasTemplateKWAndArgsInfo())
2886 return getTrailingASTTemplateKWAndArgsInfo()->
LAngleLoc;
2892 if (!hasTemplateKWAndArgsInfo())
2894 return getTrailingASTTemplateKWAndArgsInfo()->
RAngleLoc;
2904 if (!hasExplicitTemplateArgs())
2906 return const_cast<OverloadExpr *
>(
this)->getTrailingTemplateArgumentLoc();
2910 if (!hasExplicitTemplateArgs())
2917 return {getTemplateArgs(), getNumTemplateArgs()};
2922 if (hasExplicitTemplateArgs())
2923 getTrailingASTTemplateKWAndArgsInfo()->
copyInto(getTemplateArgs(), List);
2927 return T->
getStmtClass() == UnresolvedLookupExprClass ||
2946 ASTTemplateKWAndArgsInfo,
2947 TemplateArgumentLoc> {
2980 bool HasTemplateKWAndArgsInfo);
2982 unsigned numTrailingObjects(OverloadToken<DeclAccessPair>)
const {
2983 return getNumDecls();
2986 unsigned numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
2987 return hasTemplateKWAndArgsInfo();
3005 unsigned NumResults,
3006 bool HasTemplateKWAndArgsInfo,
3007 unsigned NumTemplateArgs);
3024 return l.getBeginLoc();
3025 return getNameInfo().getBeginLoc();
3029 if (hasExplicitTemplateArgs())
3030 return getRAngleLoc();
3031 return getNameInfo().getEndLoc();
3064 ASTTemplateKWAndArgsInfo,
3065 TemplateArgumentLoc> {
3082 size_t numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
3083 return hasTemplateKWAndArgsInfo();
3086 bool hasTemplateKWAndArgsInfo()
const {
3097 bool HasTemplateKWAndArgsInfo,
3098 unsigned NumTemplateArgs);
3124 if (!hasTemplateKWAndArgsInfo())
3126 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->TemplateKWLoc;
3132 if (!hasTemplateKWAndArgsInfo())
3134 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->LAngleLoc;
3140 if (!hasTemplateKWAndArgsInfo())
3142 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->RAngleLoc;
3154 if (hasExplicitTemplateArgs())
3155 getTrailingObjects<ASTTemplateKWAndArgsInfo>()->copyInto(
3156 getTrailingObjects<TemplateArgumentLoc>(), List);
3160 if (!hasExplicitTemplateArgs())
3163 return getTrailingObjects<TemplateArgumentLoc>();
3167 if (!hasExplicitTemplateArgs())
3170 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->NumTemplateArgs;
3174 return {getTemplateArgs(), getNumTemplateArgs()};
3184 if (hasExplicitTemplateArgs())
3185 return getRAngleLoc();
3186 return getLocation();
3190 return T->
getStmtClass() == DependentScopeDeclRefExprClass;
3232 unsigned numObjects);
3235 bool CleanupsHaveSideEffects,
3239 return llvm::makeArrayRef(getTrailingObjects<CleanupObject>(),
3246 assert(i < getNumObjects() &&
"Index out of range");
3247 return getObjects()[
i];
3255 return SubExpr->getBeginLoc();
3259 return SubExpr->getEndLoc();
3315 :
Expr(CXXUnresolvedConstructExprClass, Empty) {
3372 assert(I < arg_size() &&
"Argument index out-of-range");
3377 assert(I < arg_size() &&
"Argument index out-of-range");
3382 assert(I < arg_size() &&
"Argument index out-of-range");
3388 if (!RParenLoc.
isValid() && arg_size() > 0)
3394 return T->
getStmtClass() == CXXUnresolvedConstructExprClass;
3404 auto **begin =
reinterpret_cast<Stmt **
>(
3420 ASTTemplateKWAndArgsInfo,
3421 TemplateArgumentLoc, NamedDecl *> {
3460 bool hasTemplateKWAndArgsInfo()
const {
3464 bool hasFirstQualifierFoundInScope()
const {
3468 unsigned numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
3469 return hasTemplateKWAndArgsInfo();
3472 unsigned numTrailingObjects(OverloadToken<TemplateArgumentLoc>)
const {
3473 return getNumTemplateArgs();
3476 unsigned numTrailingObjects(OverloadToken<NamedDecl *>)
const {
3477 return hasFirstQualifierFoundInScope();
3490 bool HasFirstQualifierFoundInScope);
3502 unsigned NumTemplateArgs,
bool HasFirstQualifierFoundInScope);
3516 assert(!isImplicitAccess());
3517 return cast<Expr>(Base);
3552 if (!hasFirstQualifierFoundInScope())
3554 return *getTrailingObjects<NamedDecl *>();
3559 return MemberNameInfo;
3572 if (!hasTemplateKWAndArgsInfo())
3574 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->TemplateKWLoc;
3580 if (!hasTemplateKWAndArgsInfo())
3582 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->LAngleLoc;
3588 if (!hasTemplateKWAndArgsInfo())
3590 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->RAngleLoc;
3603 if (hasExplicitTemplateArgs())
3604 getTrailingObjects<ASTTemplateKWAndArgsInfo>()->copyInto(
3605 getTrailingObjects<TemplateArgumentLoc>(), List);
3611 if (!hasExplicitTemplateArgs())
3614 return getTrailingObjects<TemplateArgumentLoc>();
3620 if (!hasExplicitTemplateArgs())
3623 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->NumTemplateArgs;
3627 return {getTemplateArgs(), getNumTemplateArgs()};
3631 if (!isImplicitAccess())
3634 return getQualifierLoc().getBeginLoc();
3639 if (hasExplicitTemplateArgs())
3640 return getRAngleLoc();
3645 return T->
getStmtClass() == CXXDependentScopeMemberExprClass;
3650 if (isImplicitAccess())
3656 if (isImplicitAccess())
3680 ASTTemplateKWAndArgsInfo,
3681 TemplateArgumentLoc> {
3722 bool HasTemplateKWAndArgsInfo);
3724 unsigned numTrailingObjects(OverloadToken<DeclAccessPair>)
const {
3725 return getNumDecls();
3728 unsigned numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
3729 return hasTemplateKWAndArgsInfo();
3742 unsigned NumResults,
3743 bool HasTemplateKWAndArgsInfo,
3744 unsigned NumTemplateArgs);
3750 bool isImplicitAccess()
const;
3755 assert(!isImplicitAccess());
3756 return cast<Expr>(Base);
3759 assert(!isImplicitAccess());
3760 return cast<Expr>(Base);
3800 if (!isImplicitAccess())
3803 return l.getBeginLoc();
3804 return getMemberNameInfo().getBeginLoc();
3808 if (hasExplicitTemplateArgs())
3809 return getRAngleLoc();
3810 return getMemberNameInfo().getEndLoc();
3819 if (isImplicitAccess())
3825 if (isImplicitAccess())
3832 if (
auto *ULE = dyn_cast<UnresolvedLookupExpr>(
this))
3834 return cast<UnresolvedMemberExpr>(
this)->getTrailingObjects<DeclAccessPair>();
3838 if (!hasTemplateKWAndArgsInfo())
3841 if (
auto *ULE = dyn_cast<UnresolvedLookupExpr>(
this))
3843 return cast<UnresolvedMemberExpr>(
this)
3844 ->getTrailingObjects<ASTTemplateKWAndArgsInfo>();
3848 if (
auto *ULE = dyn_cast<UnresolvedLookupExpr>(
this))
3850 return cast<UnresolvedMemberExpr>(
this)
3851 ->getTrailingObjects<TemplateArgumentLoc>();
3855 if (
auto *ULE = dyn_cast<UnresolvedLookupExpr>(
this))
3856 return ULE->getNamingClass();
3857 return cast<UnresolvedMemberExpr>(
this)->getNamingClass();
3878 Operand(Operand), Range(Keyword, RParen) {
3932 unsigned NumExpansions;
3943 EllipsisLoc(EllipsisLoc),
3944 NumExpansions(NumExpansions ? *NumExpansions + 1 : 0),
3963 return NumExpansions - 1;
4037 OperatorLoc(OperatorLoc), PackLoc(PackLoc), RParenLoc(RParenLoc),
4038 Length(Length ? *Length : PartialArgs.size()), Pack(Pack) {
4039 assert((!Length || PartialArgs.empty()) &&
4040 "have partial args for non-dependent sizeof... expression");
4041 auto *Args = getTrailingObjects<TemplateArgument>();
4042 std::uninitialized_copy(PartialArgs.begin(), PartialArgs.end(), Args);
4047 :
Expr(SizeOfPackExprClass, Empty), Length(NumPartialArgs) {}
4056 unsigned NumPartialArgs);
4076 "Cannot get the length of a value-dependent pack size expression");
4091 assert(isPartiallySubstituted());
4092 const auto *Args = getTrailingObjects<TemplateArgument>();
4093 return llvm::makeArrayRef(Args, Args + Length);
4126 :
Expr(SubstNonTypeTemplateParmExprClass, Empty) {}
4137 Param(Param), Replacement(Replacement) {
4152 return s->
getStmtClass() == SubstNonTypeTemplateParmExprClass;
4187 unsigned NumArguments;
4193 :
Expr(SubstNonTypeTemplateParmPackExprClass, Empty) {}
4216 return T->
getStmtClass() == SubstNonTypeTemplateParmPackExprClass;
4257 unsigned NumParameters;
4269 unsigned NumParams);
4339 unsigned ManglingNumber;
4341 llvm::PointerUnion<Stmt *, ExtraState *>
State;
4343 void initializeExtraState(
const ValueDecl *ExtendedBy,
4344 unsigned ManglingNumber);
4348 bool BoundToLvalueReference)
4349 :
Expr(MaterializeTemporaryExprClass, T,
4357 :
Expr(MaterializeTemporaryExprClass, Empty) {}
4360 return State.is<
Stmt *>() ? State.get<
Stmt *>()
4361 : State.get<ExtraState *>()->Temporary;
4370 const ValueDecl *ExtendingDecl = getExtendingDecl();
4375 if (isa<FieldDecl>(ExtendingDecl))
4379 if (isa<BindingDecl>(ExtendingDecl))
4383 return cast<VarDecl>(ExtendingDecl)->getStorageDuration();
4389 return State.is<
Stmt *>() ?
nullptr 4390 : State.get<ExtraState *>()->ExtendingDecl;
4393 void setExtendingDecl(
const ValueDecl *ExtendedBy,
unsigned ManglingNumber);
4396 return State.is<
Stmt *>() ? 0 : State.get<ExtraState *>()->ManglingNumber;
4406 return getTemporary()->getBeginLoc();
4410 return getTemporary()->getEndLoc();
4414 return T->
getStmtClass() == MaterializeTemporaryExprClass;
4419 if (State.is<
Stmt *>())
4420 return child_range(State.getAddrOfPtr1(), State.getAddrOfPtr1() + 1);
4422 auto ES = State.get<ExtraState *>();
4423 return child_range(&ES->Temporary, &ES->Temporary + 1);
4427 if (State.is<
Stmt *>())
4429 State.getAddrOfPtr1() + 1);
4431 auto ES = State.get<ExtraState *>();
4453 unsigned NumExpansions;
4464 LParenLoc(LParenLoc), EllipsisLoc(EllipsisLoc), RParenLoc(RParenLoc),
4465 NumExpansions(NumExpansions ? *NumExpansions + 1 : 0), Opcode(Opcode) {
4477 return getLHS() && getLHS()->containsUnexpandedParameterPack();
4494 return NumExpansions - 1;
4532 enum SubExpr { Common, Ready, Suspend, Resume, Count };
4534 Stmt *SubExprs[SubExpr::Count];
4545 KeywordLoc(KeywordLoc), OpaqueValue(OpaqueValue) {
4546 SubExprs[SubExpr::Common] = Common;
4547 SubExprs[SubExpr::Ready] = Ready;
4548 SubExprs[SubExpr::Suspend] = Suspend;
4549 SubExprs[SubExpr::Resume] = Resume;
4556 KeywordLoc(KeywordLoc) {
4558 "wrong constructor for non-dependent co_await/co_yield expression");
4559 SubExprs[SubExpr::Common] = Common;
4560 SubExprs[SubExpr::Ready] =
nullptr;
4561 SubExprs[SubExpr::Suspend] =
nullptr;
4562 SubExprs[SubExpr::Resume] =
nullptr;
4566 SubExprs[SubExpr::Common] =
nullptr;
4567 SubExprs[SubExpr::Ready] =
nullptr;
4568 SubExprs[SubExpr::Suspend] =
nullptr;
4569 SubExprs[SubExpr::Resume] =
nullptr;
4575 return static_cast<Expr*
>(SubExprs[SubExpr::Common]);
4582 return static_cast<Expr*
>(SubExprs[SubExpr::Ready]);
4586 return static_cast<Expr*
>(SubExprs[SubExpr::Suspend]);
4590 return static_cast<Expr*
>(SubExprs[SubExpr::Resume]);
4596 return getCommonExpr()->getEndLoc();
4600 return child_range(SubExprs, SubExprs + SubExpr::Count);
4620 bool IsImplicit =
false)
4622 Suspend, Resume, OpaqueValue) {
4627 bool IsImplicit =
false)
4637 return getCommonExpr();
4663 KeywordLoc(KeywordLoc) {
4667 "wrong constructor for non-dependent co_await/co_yield expression");
4669 SubExprs[1] = OpCoawait;
4673 :
Expr(DependentCoawaitExprClass, Empty) {}
4678 return cast<UnresolvedLookupExpr>(SubExprs[1]);
4686 return getOperand()->getEndLoc();
4708 Suspend, Resume, OpaqueValue) {}
4716 return getCommonExpr();
4743 KWLoc(KWLoc), RParenLoc(RParenLoc) {}
4755 #endif // LLVM_CLANG_AST_EXPRCXX_H CXXUuidofExpr(QualType Ty, TypeSourceInfo *Operand, StringRef UuidStr, SourceRange R)
CoroutineSuspendExpr(StmtClass SC, SourceLocation KeywordLoc, Expr *Common, Expr *Ready, Expr *Suspend, Expr *Resume, OpaqueValueExpr *OpaqueValue)
Expr * getReadyExpr() const
A call to an overloaded operator written using operator syntax.
SourceLocation getLoc() const
getLoc - Returns the main location of the declaration name.
Raw form: operator "" X (const char *)
SourceLocation getBeginLoc() const LLVM_READONLY
MSPropertySubscriptExpr(EmptyShell Shell)
Create an empty array subscript expression.
CXXDeleteExpr(EmptyShell Shell)
void setRParenLoc(SourceLocation L)
LiteralOperatorKind
The kind of literal operator which is invoked.
operator "" X (long double)
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
The null pointer literal (C++11 [lex.nullptr])
const CXXDestructorDecl * getDestructor() const
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
SourceLocation getBeginLoc() const
unsigned getNumDecls() const
Gets the number of declarations in the unresolved set.
Represents a function declaration or definition.
Represents a 'co_await' expression while the type of the promise is dependent.
Optional< unsigned > getNumExpansions() const
Expr ** getArgs()
Retrieve the call arguments.
SourceLocation getEndLoc() const LLVM_READONLY
bool hasExplicitTemplateArgs() const
Determines whether this expression had explicit template arguments.
static bool classof(const Stmt *T)
CoawaitExpr(SourceLocation CoawaitLoc, QualType Ty, Expr *Operand, bool IsImplicit=false)
bool hasTemplateKeyword() const
Determines whether the name was preceded by the template keyword.
SourceLocation getRParenLoc() const
SourceLocation getEndLoc() const
UnresolvedMemberExprBitfields UnresolvedMemberExprBits
PointerType - C99 6.7.5.1 - Pointer Declarators.
CXXNullPtrLiteralExpr(QualType Ty, SourceLocation Loc)
llvm::iterator_range< arg_iterator > placement_arguments()
SourceLocation getUsedLocation() const
Retrieve the location where this default argument was actually used.
Stores the type being destroyed by a pseudo-destructor expression.
A (possibly-)qualified type.
CXXBoolLiteralExpr(EmptyShell Empty)
uint64_t getValue() const
SourceLocation getBeginLoc() const
ArrayRef< TemplateArgumentLoc > template_arguments() const
Expr * getArg(unsigned Arg)
getArg - Return the specified argument.
CXXDeleteExprBitfields CXXDeleteExprBits
SourceLocation getUsedLocation() const
Retrieve the location where this default initializer expression was actually used.
SourceRange getSourceRange() const
Defines enumerations for the type traits support.
void setLocation(SourceLocation L)
const Expr * getSubExpr() const
static QualType getObjectType(APValue::LValueBase B)
Retrieves the "underlying object type" of the given expression, as used by __builtin_object_size.
CoawaitExpr(EmptyShell Empty)
const_capture_init_iterator capture_init_begin() const
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
VarDecl * getParameterPack() const
Get the parameter pack which this expression refers to.
SourceLocation TemplateKWLoc
The source location of the template keyword; this is used as part of the representation of qualified ...
const_arg_iterator placement_arg_end() const
bool isListInitialization() const
Determine whether this expression models list-initialization.
SourceLocation getBeginLoc() const LLVM_READONLY
CXXThisExprBitfields CXXThisExprBits
bool hasExplicitResultType() const
Whether this lambda had its result type explicitly specified.
bool isThrownVariableInScope() const
Determines whether the variable thrown by this expression (if any!) is within the innermost try block...
CXXUnresolvedConstructExprBitfields CXXUnresolvedConstructExprBits
bool isLeftFold() const
Does this produce a left-associated sequence of operators?
Stmt - This represents one statement.
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
Expr * getDimensionExpression() const
SourceLocation getUDSuffixLoc() const
Returns the location of a ud-suffix in the expression.
bool isArrayFormAsWritten() const
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
TemplateArgumentLoc const * getTemplateArgs() const
static bool classof(const Stmt *T)
C Language Family Type Representation.
SourceLocation getEndLoc() const LLVM_READONLY
ArrayRef< CleanupObject > getObjects() const
FunctionDecl * getOperatorNew() const
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
const CXXRecordDecl * getNamingClass() const
const_child_range children() const
SourceLocation getEndLoc() const
const_child_range children() const
The base class of the type hierarchy.
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies this declaration.
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called...
const_child_range children() const
SourceLocation getBeginLoc() const
getBeginLoc - Retrieve the location of the first token.
static bool classof(const Stmt *T)
CXXFoldExpr(QualType T, SourceLocation LParenLoc, Expr *LHS, BinaryOperatorKind Opcode, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc, Optional< unsigned > NumExpansions)
SourceLocation getLocation() const
llvm::iterator_range< child_iterator > child_range
SourceLocation getKeywordLoc() const
Represents a call to a C++ constructor.
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getBeginLoc() const LLVM_READONLY
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent...
static bool classof(const Stmt *S)
const_child_range children() const
A container of type source information.
SourceLocation getBeginLoc() const LLVM_READONLY
NestedNameSpecifier * getQualifier() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name...
StorageDuration
The storage duration for an object (per C++ [basic.stc]).
Floating point control options.
Stmt * getTemporary() const
MS property subscript expression.
SourceLocation getBeginLoc() const LLVM_READONLY
SourceLocation getOperatorLoc() const
Determine the location of the 'sizeof' keyword.
SourceLocation getRParenLoc() const
static bool classof(const Stmt *T)
void setLocation(SourceLocation Loc)
Describes the capture of a variable or of this, or of a C++1y init-capture.
Represents a C++ constructor within a class.
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
SourceLocation getEndLoc() const LLVM_READONLY
CXXRecordDecl * getNamingClass()
Gets the naming class of this lookup, if any.
void setRParenLoc(SourceLocation L)
static CXXOperatorCallExpr * Create(const ASTContext &Ctx, OverloadedOperatorKind OpKind, Expr *Fn, ArrayRef< Expr *> Args, QualType Ty, ExprValueKind VK, SourceLocation OperatorLoc, FPOptions FPFeatures, ADLCallKind UsesADL=NotADL)
const_child_range children() const
SourceLocation getBeginLoc() const LLVM_READONLY
Represents a variable declaration or definition.
const_child_range children() const
QualType getBaseType() const
SourceLocation getEndLoc() const LLVM_READONLY
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation getOperatorLoc() const
Retrieve the location of the '.' or '->' operator.
UnresolvedLookupExpr * getOperatorCoawaitLookup() const
IdentifierInfo * getIdentifier() const
const T * getAs() const
Member-template getAs<specific type>'.
SourceLocation getEndLoc() const
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
SourceRange getSourceRange() const
llvm::iterator_range< arg_iterator > arg_range
CXXDeleteExpr(QualType Ty, bool GlobalDelete, bool ArrayForm, bool ArrayFormAsWritten, bool UsualArrayDeleteWantsSize, FunctionDecl *OperatorDelete, Expr *Arg, SourceLocation Loc)
SourceLocation getEndLoc() const
static bool classof(const Stmt *T)
DeclarationName getName() const
Gets the name looked up.
SourceLocation getEndLoc() const LLVM_READONLY
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
static bool classof(const Stmt *T)
Stores a list of template parameters for a TemplateDecl and its derived classes.
SourceLocation getBeginLoc() const LLVM_READONLY
static bool classof(const Stmt *T)
unsigned getNumPlacementArgs() const
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
static CXXDefaultInitExpr * Create(const ASTContext &Ctx, SourceLocation Loc, FieldDecl *Field, DeclContext *UsedContext)
Field is the non-static data member whose default initializer is used by this expression.
raw_arg_iterator raw_arg_begin()
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will call.
A C++ throw-expression (C++ [except.throw]).
Expr * getExprOperand() const
Represents an expression – generally a full-expression – that introduces cleanups to be run at the ...
TypeSourceInfo * getArg(unsigned I) const
Retrieve the Ith argument.
Represents a parameter to a function.
bool isAssignmentOp() const
CXXDefaultArgExpr(EmptyShell Empty)
bool hasQualifier() const
Evaluates true when this nested-name-specifier location is empty.
SourceLocation getBeginLoc() const LLVM_READONLY
CoawaitExprBitfields CoawaitBits
A C++ static_cast expression (C++ [expr.static.cast]).
Expr * getExprOperand() const
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getRParenLoc() const
Retrieve the location of the closing parenthesis.
TypeSourceInfo * getScopeTypeInfo() const
Retrieve the scope type in a qualified pseudo-destructor expression.
One of these records is kept for each identifier that is lexed.
Expr * GetTemporaryExpr() const
Retrieve the temporary-generating subexpression whose value will be materialized into a glvalue...
SourceLocation getTildeLoc() const
Retrieve the location of the '~'.
bool cleanupsHaveSideEffects() const
const Expr * getArg(unsigned Arg) const
SourceLocation getBeginLoc() const LLVM_READONLY
SourceLocation getBeginLoc() const
void setExprOperand(Expr *E)
ExpressionTraitExpr(SourceLocation loc, ExpressionTrait et, Expr *queried, bool value, SourceLocation rparen, QualType resultType)
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
A C++ nested-name-specifier augmented with source location information.
static bool classof(const Stmt *T)
ConstCastIterator< Expr > ConstExprIterator
const_child_range children() const
static constexpr ADLCallKind UsesADL
const_child_range children() const
FullExpr - Represents a "full-expression" node.
static bool classof(const Stmt *T)
SourceLocation getBeginLoc() const LLVM_READONLY
Represents a member of a struct/union/class.
const FieldDecl * getField() const
Expr * getBase()
Retrieve the base object of this member expressions, e.g., the x in x.m.
static bool classof(const Stmt *T)
Defines the ExceptionSpecificationType enumeration and various utility functions. ...
NonTypeTemplateParmDecl * getParameter() const
SourceLocation getBeginLoc() const
const DeclarationNameInfo & getNameInfo() const
Gets the full name info.
llvm::iterator_range< const_arg_iterator > placement_arguments() const
void setRequiresZeroInitialization(bool ZeroInit)
SourceLocation getEndLoc() const LLVM_READONLY
void setArg(unsigned I, Expr *E)
const CXXConstructExpr * getConstructExpr() const
Returns the CXXConstructExpr from this new-expression, or null.
const Expr * getCookedLiteral() const
The iterator over UnresolvedSets.
void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const
Copies the template arguments (if present) into the given structure.
void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const
Copies the template arguments into the given structure.
bool isSpecificBuiltinType(unsigned K) const
Test for a particular builtin type.
Expr * getArg(unsigned I)
Represents a C++ member access expression for which lookup produced a set of overloaded functions...
CXXInheritedCtorInitExpr(EmptyShell Empty)
Construct an empty C++ inheriting construction expression.
SourceLocation getEndLoc() const LLVM_READONLY
static bool classof(const Stmt *T)
const_child_range children() const
CXXUuidofExpr(QualType Ty, Expr *Operand, StringRef UuidStr, SourceRange R)
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
LambdaCaptureDefault getCaptureDefault() const
Determine the default capture kind for this lambda.
const_child_range children() const
ArrayRef< TemplateArgumentLoc > template_arguments() const
bool isGenericLambda() const
Whether this is a generic lambda.
bool hasExplicitTemplateArgs() const
Determines whether this lookup had explicit template arguments.
An r-value expression (a pr-value in the C++11 taxonomy) produces a temporary value.
SourceLocation getEndLoc() const LLVM_READONLY
void setDestroyedType(TypeSourceInfo *Info)
Set the destroyed type.
const Expr *const * const_arg_iterator
SourceLocation getBeginLoc() const
SourceLocation getMemberLoc() const
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
SourceLocation getBeginLoc() const LLVM_READONLY
Note: getBeginLoc() is the start of the whole DependentScopeDeclRefExpr, and differs from getLocation...
SourceLocation getBeginLoc() const LLVM_READONLY
Optional< Expr * > getArraySize()
MSPropertyRefExpr(Expr *baseExpr, MSPropertyDecl *decl, bool isArrow, QualType ty, ExprValueKind VK, NestedNameSpecifierLoc qualifierLoc, SourceLocation nameLoc)
unsigned getNumExpansions() const
Get the number of parameters in this parameter pack.
SourceLocation getEndLoc() const
SourceLocation getBeginLoc() const LLVM_READONLY
void setOperatorNew(FunctionDecl *D)
FunctionDecl * getOperatorDelete() const
void setLocation(SourceLocation L)
bool isElidable() const
Whether this construction is elidable.
Expr * getOperand() const
CXXScalarValueInitExprBitfields CXXScalarValueInitExprBits
static bool classof(const Stmt *T)
bool HasFormOfMemberPointer
SourceLocation getParameterPackLocation() const
Retrieve the location of the parameter pack name.
const_child_range children() const
A convenient class for passing around template argument information.
PseudoDestructorTypeStorage(IdentifierInfo *II, SourceLocation Loc)
const Expr * getPlacementArg(unsigned I) const
SourceLocation getBeginLoc() const LLVM_READONLY
SourceLocation getLocation() const
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
SourceLocation getEndLoc() const LLVM_READONLY
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
Expr * getInitializer()
The initializer of this new-expression.
An x-value expression is a reference to an object with independent storage but which can be "moved"...
ExprValueKind getValueKind() const
getValueKind - The value kind that this expression produces.
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding this name, if any.
static bool classof(const Stmt *T)
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
bool constructsVBase() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
CXXScalarValueInitExpr(QualType Type, TypeSourceInfo *TypeInfo, SourceLocation RParenLoc)
Create an explicitly-written scalar-value initialization expression.
SourceLocation getThrowLoc() const
SourceLocation getEndLoc() const LLVM_READONLY
CXXBoolLiteralExpr(bool Val, QualType Ty, SourceLocation Loc)
static bool classof(const Stmt *T)
CXXThrowExpr(Expr *Operand, QualType Ty, SourceLocation Loc, bool IsThrownVariableInScope)
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
const CallExpr * getConfig() const
SourceLocation getBeginLoc() const LLVM_READONLY
FPOptions getFPFeatures() const
New-expression has a C++98 paren-delimited initializer.
void setListInitialization(bool V)
unsigned getInt() const
Used to serialize this.
NestedNameSpecifier * getQualifier() const
Fetches the nested-name qualifier, if one was given.
SourceLocation getEndLoc() const
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
FieldDecl * getField()
Get the field whose initializer will be used.
CXXStdInitializerListExpr(QualType Ty, Expr *SubExpr)
Expr * getOperand() const
const_child_range children() const
SourceLocation getEndLoc() const LLVM_READONLY
Represents binding an expression to a temporary.
OpaqueValueExpr * getOpaqueValue() const
getOpaqueValue - Return the opaque value placeholder.
void setDestroyedType(IdentifierInfo *II, SourceLocation Loc)
Set the name of destroyed type for a dependent pseudo-destructor expression.
Expr * getCommonExpr() const
ArrayTypeTrait
Names for the array type traits.
const internal::VariadicDynCastAllOfMatcher< Stmt, CastExpr > castExpr
Matches any cast nodes of Clang's AST.
CXXTemporary * getTemporary()
static bool classof(const Stmt *T)
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
CXXRecordDecl * getNamingClass()
Gets the 'naming class' (in the sense of C++0x [class.access.base]p5) of the lookup.
DeclAccessPair * getTrailingResults()
Return the results. Defined after UnresolvedMemberExpr.
bool isTypeDependent() const
isTypeDependent - Determines whether this expression is type-dependent (C++ [temp.dep.expr]), which means that its type could change from one template instantiation to the next.
SourceLocation getBeginLoc() const
Default argument expressions have no representation in the source, so they have an empty source range...
DeclarationName getDeclName() const
Retrieve the name that this expression refers to.
An ordinary object is located at an address in memory.
const_child_range children() const
Represents a C++ member access expression where the actual member referenced could not be resolved be...
SubstNonTypeTemplateParmExpr(QualType Ty, ExprValueKind ValueKind, SourceLocation Loc, NonTypeTemplateParmDecl *Param, Expr *Replacement)
CXXBindTemporaryExpr(EmptyShell Empty)
SourceLocation getNameLoc() const
TypeSourceInfo * getTypeSourceInfo() const
const_arg_iterator arg_begin() const
A default argument (C++ [dcl.fct.default]).
bool isTypeOperand() const
void setSourceRange(SourceRange R)
arg_iterator placement_arg_end()
CoyieldExpr(SourceLocation CoyieldLoc, Expr *Operand, Expr *Ready, Expr *Suspend, Expr *Resume, OpaqueValueExpr *OpaqueValue)
SourceLocation getMemberLoc() const
Retrieve the location of the name of the member that this expression refers to.
NamedDecl * getFirstQualifierFoundInScope() const
Retrieve the first part of the nested-name-specifier that was found in the scope of the member access...
Represents the this expression in C++.
SourceLocation getBeginLoc() const LLVM_READONLY
DeclarationName getMemberName() const
Retrieve the name of the member that this expression refers to.
New-expression has no initializer as written.
SourceLocation getRParenLoc() const
Retrieve the location of the right parentheses (')') that follows the argument list.
TypeSourceInfo * getAllocatedTypeSourceInfo() const
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
TypeTrait
Names for traits that operate specifically on types.
const Expr * getExpr() const
Get the initialization expression that will be used.
TypeSourceInfo * getQueriedTypeSourceInfo() const
const_child_range children() const
const_child_range children() const
bool isRightFold() const
Does this produce a right-associated sequence of operators?
CXXScalarValueInitExpr(EmptyShell Shell)
const_child_range children() const
const ValueDecl * getExtendingDecl() const
Get the declaration which triggered the lifetime-extension of this temporary, if any.
TypeSourceInfo * getTypeSourceInfo() const
SourceLocation getBeginLoc() const LLVM_READONLY
bool isStdInitListInitialization() const
Whether this constructor call was written as list-initialization, but was interpreted as forming a st...
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
SourceLocation getBeginLoc() const LLVM_READONLY
llvm::iterator_range< const_child_iterator > const_child_range
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
CompoundStmt - This represents a group of statements like { stmt stmt }.
void setFPFeatures(FPOptions F)
unsigned NumTemplateArgs
The number of template arguments in TemplateArgs.
static bool classof(const Stmt *T)
QualType getQueriedType() const
CXXTypeidExpr(QualType Ty, TypeSourceInfo *Operand, SourceRange R)
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
ArrayTypeTraitExpr(EmptyShell Empty)
SourceLocation getEndLoc() const
const_arg_range arguments() const
CastKind
CastKind - The kind of operation required for a conversion.
const TemplateArgumentLoc * getTemplateArgs() const
Retrieve the template arguments provided as part of this template-id.
static bool classof(const Stmt *T)
CXXTypeidExpr(QualType Ty, Expr *Operand, SourceRange R)
static bool classof(const Stmt *T)
SourceLocation getLocation() const
SourceLocation getRBracketLoc() const
ArrayRef< TypeSourceInfo * > getArgs() const
Retrieve the argument types.
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getEndLoc() const
bool isImplicitAccess() const
True if this is an implicit access, i.e.
ConstStmtIterator const_child_iterator
const_child_range children() const
SubstNonTypeTemplateParmExprBitfields SubstNonTypeTemplateParmExprBits
SourceLocation getDestroyedTypeLoc() const
Retrieve the starting location of the type being destroyed.
const_child_range children() const
void setOperatorDelete(FunctionDecl *D)
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type...
SourceLocation getOperatorLoc() const
Retrieve the location of the '->' or '.' operator.
const_child_range children() const
SourceRange getSourceRange() const LLVM_READONLY
Retrieve the source range of the expression.
Represents a block literal declaration, which is like an unnamed FunctionDecl.
static bool classof(const Stmt *T)
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
This represents one expression.
Defines the clang::LangOptions interface.
static bool classof(const Stmt *T)
void setIsImplicit(bool value=true)
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
SourceLocation getCaptureDefaultLoc() const
Retrieve the location of this lambda's capture-default, if any.
TemplateArgumentLoc const * getTemplateArgs() const
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '...
SourceLocation getBeginLoc() const
const CXXRecordDecl * getNamingClass() const
static FindResult find(Expr *E)
Finds the overloaded expression in the given expression E of OverloadTy.
unsigned getPackLength() const
Retrieve the length of the parameter pack.
SourceLocation getBeginLoc() const LLVM_READONLY
Represents a C++ functional cast expression that builds a temporary object.
SourceLocation getBeginLoc() const
Retrieve the location of the beginning of this nested-name-specifier.
A C++ const_cast expression (C++ [expr.const.cast]).
SourceLocation getExprLoc() const LLVM_READONLY
SourceLocation getLocation() const
void setTypeOperandSourceInfo(TypeSourceInfo *TSI)
Represents a C++ destructor within a class.
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
IdentifierInfo * getDestroyedTypeIdentifier() const
In a dependent pseudo-destructor expression for which we do not have full type information on the des...
Defines an enumeration for C++ overloaded operators.
SourceLocation getBeginLoc() const LLVM_READONLY
Stmt * getPreArg(unsigned I)
raw_arg_iterator raw_arg_end()
bool isArrow() const
Determine whether this pseudo-destructor expression was written using an '->' (otherwise, it used a '.
void setUuidStr(StringRef US)
unsigned getNumTemplateArgs() const
DeclContext * getDeclContext()
void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const
Copies the template arguments (if present) into the given structure.
static bool classof(const Stmt *T)
Represents an expression that computes the length of a parameter pack.
llvm::iterator_range< const_capture_init_iterator > capture_inits() const
Retrieve the initialization expressions for this lambda's captures.
static bool classof(const Stmt *T)
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
ArrayTypeTraitExpr(SourceLocation loc, ArrayTypeTrait att, TypeSourceInfo *queried, uint64_t value, Expr *dimension, SourceLocation rparen, QualType ty)
static bool classof(const Stmt *s)
ArrayTypeTrait getTrait() const
CXXDefaultInitExprBitfields CXXDefaultInitExprBits
decls_iterator decls_begin() const
static bool classof(const Stmt *T)
ExprWithCleanupsBitfields ExprWithCleanupsBits
const_child_range children() const
llvm::iterator_range< const_arg_iterator > const_arg_range
const_child_range children() const
SourceRange getAngleBrackets() const LLVM_READONLY
const Expr * getIdx() const
bool isFunctionOrMethod() const
SourceLocation getLocation() const
Retrieve the location of the name within the expression.
const Expr * getInitializer() const
const_child_range children() const
SourceLocation getExprLoc() const LLVM_READONLY
Expr * getPattern() const
Get the pattern, that is, the operand that contains an unexpanded pack.
static bool classof(const Stmt *T)
CXXConstructExpr::ConstructionKind getConstructionKind() const
bool hasInitializer() const
Whether this new-expression has any initializer at all.
StorageDuration getStorageDuration() const
Retrieve the storage duration for the materialized temporary.
Represents a folding of a pack over an operator.
const_child_range children() const
static bool classof(const Stmt *T)
SourceLocation getEndLoc() const LLVM_READONLY
const Expr * getBase() const
SourceLocation getEnd() const
SourceLocation getEndLoc() const LLVM_READONLY
A member reference to an MSPropertyDecl.
StmtIterator child_iterator
Child Iterators: All subclasses must implement 'children' to permit easy iteration over the substatem...
Represents a reference to a non-type template parameter that has been substituted with a template arg...
const_child_range children() const
SourceLocation getBeginLoc() const
The result type of a method or function.
SourceRange getSourceRange() const LLVM_READONLY
const Expr * getSubExpr() const
SourceLocation getPackLoc() const
Determine the location of the parameter pack.
MSPropertyRefExpr(EmptyShell Empty)
const Expr *const * getArgs() const
CoyieldExpr(EmptyShell Empty)
const DeclContext * getUsedContext() const
DependentCoawaitExpr(SourceLocation KeywordLoc, QualType Ty, Expr *Op, UnresolvedLookupExpr *OpCoawait)
SourceLocation getEndLoc() const LLVM_READONLY
const_child_range children() const
MSPropertySubscriptExpr(Expr *Base, Expr *Idx, QualType Ty, ExprValueKind VK, ExprObjectKind OK, SourceLocation RBracketLoc)
SourceRange getSourceRange() const
SourceLocation getEndLoc() const LLVM_READONLY
static bool classof(const Stmt *T)
ExprObjectKind getObjectKind() const
getObjectKind - The object kind that this expression produces.
const_child_range children() const
static bool classof(const Stmt *T)
SourceLocation getOperatorLoc() const
Retrieve the location of the '->' or '.' operator.
void setTypeOperandSourceInfo(TypeSourceInfo *TSI)
const Expr * getArgument() const
const TemplateArgumentLoc * getTrailingTemplateArgumentLoc() const
const_child_range children() const
SourceLocation getLParenLoc() const
Retrieve the location of the left parentheses ('(') that precedes the argument list.
SourceLocation getBeginLoc() const
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the member name.
SourceLocation getOperatorLoc() const
Returns the location of the operator symbol in the expression.
static bool classof(const Stmt *T)
const DeclarationNameInfo & getNameInfo() const
Retrieve the name that this expression refers to.
const_arg_range arguments() const
SourceRange getSourceRange() const LLVM_READONLY
static bool classof(const Stmt *S)
const Expr * getBase() const
void copyInto(const TemplateArgumentLoc *ArgArray, TemplateArgumentListInfo &List) const
CanThrowResult
Possible results from evaluation of a noexcept expression.
void setLParenLoc(SourceLocation L)
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class...
UnresolvedSetIterator iterator
MaterializeTemporaryExpr(EmptyShell Empty)
llvm::iterator_range< arg_iterator > arg_range
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr...
Expr * getInit() const
Get the operand that doesn't contain a pack, for a binary fold.
static std::string getCastName(const Expr *Cast)
Represents a call to an inherited base class constructor from an inheriting constructor.
operator "" X (const CharT *, size_t)
ExpressionTrait getTrait() const
Expr ** getPlacementArgs()
static bool classof(const Stmt *T)
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on a template...
Raw form: operator "" X<cs...> ()
static unsigned sizeOfTrailingObjects(unsigned NumArgs)
Return the size in bytes of the trailing objects.
SourceLocation getNameLoc() const
Gets the location of the name.
const_child_range children() const
bool inheritedFromVBase() const
Determine whether the inherited constructor is inherited from a virtual base of the object we constru...
void setHadMultipleCandidates(bool V)
Encodes a location in the source.
SourceLocation getEndLoc() const LLVM_READONLY
const_arg_iterator placement_arg_begin() const
Defines enumerations for expression traits intrinsics.
static bool classof(const Stmt *T)
static constexpr ADLCallKind NotADL
CastIterator< Expr > ExprIterator
CXXNamedCastExpr(StmtClass SC, QualType ty, ExprValueKind VK, CastKind kind, Expr *op, unsigned PathSize, TypeSourceInfo *writtenTy, SourceLocation l, SourceLocation RParenLoc, SourceRange AngleBrackets)
UnresolvedLookupExprBitfields UnresolvedLookupExprBits
static CXXOperatorCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, EmptyShell Empty)
Represents a C++ temporary.
bool hasExplicitTemplateArgs() const
Determines whether this member expression actually had a C++ template argument list explicitly specif...
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
NestedNameSpecifierLoc getQualifierLoc() const
Retrieves the nested-name-specifier that qualifies the type name, with source-location information...
CXXThrowExprBitfields CXXThrowExprBits
SourceLocation getEndLoc() const LLVM_READONLY
bool hasUnresolvedUsing() const
Determine whether the lookup results contain an unresolved using declaration.
bool hasQualifier() const
Determines whether this member expression actually had a C++ nested-name-specifier prior to the name ...
PackExpansionExpr(EmptyShell Empty)
SourceLocation getOperatorLoc() const
Retrieve the location of the cast operator keyword, e.g., static_cast.
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
SourceLocation getBeginLoc() const
DeclarationName getName() const
getName - Returns the embedded declaration name.
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit...
void setSourceRange(SourceRange R)
Represents a C++2a __builtin_bit_cast(T, v) expression.
SourceLocation getEllipsisLoc() const
Retrieve the location of the ellipsis that describes this pack expansion.
Represents a call to a member function that may be written either with member call syntax (e...
llvm::iterator_range< capture_init_iterator > capture_inits()
Retrieve the initialization expressions for this lambda's captures.
static bool classof(const Stmt *T)
Defines several types used to describe C++ lambda expressions that are shared between the parser and ...
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getEndLoc() const LLVM_READONLY
Expr * getInClassInitializer() const
Get the C++11 default member initializer for this member, or null if one has not been set...
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
Represents a static or instance method of a struct/union/class.
void setTemporary(CXXTemporary *T)
static bool classof(const Stmt *T)
static bool classof(const Stmt *T)
SourceLocation getEndLoc() const
SourceLocation RAngleLoc
The source location of the right angle bracket ('>').
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
SourceLocation getEndLoc() const LLVM_READONLY
bool isFPContractableWithinStatement() const
void setDestructor(const CXXDestructorDecl *Dtor)
QualType getAllocatedType() const
DeclContext * getUsedContext()
bool isBoundToLvalueReference() const
Determine whether this materialized temporary is bound to an lvalue reference; otherwise, it's bound to an rvalue reference.
VarDecl * getExpansion(unsigned I) const
Get an expansion of the parameter pack by index.
Expr * getSuspendExpr() const
unsigned capture_size() const
Determine the number of captures in this lambda.
SourceLocation getEndLoc() const
static bool classof(const Stmt *T)
const_capture_init_iterator capture_init_end() const
Retrieve the iterator pointing one past the last initialization argument for this lambda expression...
bool isValueDependent() const
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
SourceLocation getEndLoc() const LLVM_READONLY
CXXNamedCastExpr(StmtClass SC, EmptyShell Shell, unsigned PathSize)
bool hasTemplateKeyword() const
Determines whether the member name was preceded by the template keyword.
const_child_range children() const
bool isParenTypeId() const
bool isInfixBinaryOp() const
Is this written as an infix binary operator?
bool isImplicitAccess() const
An expression trait intrinsic.
SourceLocation getBeginLoc() const LLVM_READONLY
const_child_range children() const
ArrayRef< TemplateArgumentLoc > template_arguments() const
CoyieldExpr(SourceLocation CoyieldLoc, QualType Ty, Expr *Operand)
const_child_range children() const
bool passAlignment() const
Indicates whether the required alignment should be implicitly passed to the allocation function...
llvm::iterator_range< const_arg_iterator > const_arg_range
FunctionDecl * getOperatorDelete() const
SourceLocation getBeginLoc() const LLVM_READONLY
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding this name, if any.
A placeholder type used to construct an empty shell of a type, that will be filled in later (e...
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
PackExpansionExpr(QualType T, Expr *Pattern, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions)
A qualified reference to a name whose declaration cannot yet be resolved.
void setRBracketLoc(SourceLocation L)
InitializationStyle getInitializationStyle() const
The kind of initializer this new-expression has.
SourceLocation getLocation() const LLVM_READONLY
Defines various enumerations that describe declaration and type specifiers.
A POD class for pairing a NamedDecl* with an access specifier.
ArrayRef< TemplateArgument > getPartialArguments() const
Get.
SourceLocation getBeginLoc() const LLVM_READONLY
Represents a reference to a function parameter pack or init-capture pack that has been substituted bu...
DeclContext * getUsedContext()
Represents a template argument.
const DeclAccessPair * getTrailingResults() const
unsigned getManglingNumber() const
SourceLocation getMemberLoc() const
TypeSourceInfo * getDestroyedTypeInfo() const
Retrieve the source location information for the type being destroyed.
SourceLocation getEndLoc() const LLVM_READONLY
bool isTypeOperand() const
SourceLocation getLocation() const
static bool classof(const Stmt *T)
Dataflow Directional Tag Classes.
NestedNameSpecifier * getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
bool isValid() const
Return true if this is a valid SourceLocation object.
SourceLocation getExprLoc() const
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
CXXNullPtrLiteralExprBitfields CXXNullPtrLiteralExprBits
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
static bool classof(const Stmt *T)
static std::string getName(const CallEvent &Call)
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
NonTypeTemplateParmDecl * getParameterPack() const
Retrieve the non-type template parameter pack being substituted.
const_arg_iterator arg_end() const
MSPropertyDecl * getPropertyDecl() const
CXXNoexceptExpr(EmptyShell Empty)
SourceLocation getBeginLoc() const LLVM_READONLY
CXXFoldExpr(EmptyShell Empty)
Reads an AST files chain containing the contents of a translation unit.
const Expr * getPattern() const
Retrieve the pattern of the pack expansion.
SourceLocation getBeginLoc() const LLVM_READONLY
TypeSourceInfo * getTypeSourceInfo() const
Retrieve the type source information for the type being constructed.
VarDecl *const * iterator
Iterators over the parameters which the parameter pack expanded into.
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
CXXNoexceptExpr(QualType Ty, Expr *Operand, CanThrowResult Val, SourceLocation Keyword, SourceLocation RParen)
TypeSourceInfo * getTypeSourceInfo() const
Represents a 'co_yield' expression.
void setConstructionKind(ConstructionKind CK)
DeclarationName getMember() const
Retrieve the name of the member that this expression refers to.
The name of a declaration.
StmtClass getStmtClass() const
SourceRange getIntroducerRange() const
Retrieve the source range covering the lambda introducer, which contains the explicit capture list su...
const Expr * getExpr() const
OverloadExpr * Expression
SourceLocation getEndLoc() const LLVM_READONLY
Represents a C++11 pack expansion that produces a sequence of expressions.
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
static bool classof(const Stmt *T)
static bool classof(const Stmt *T)
DependentScopeDeclRefExprBitfields DependentScopeDeclRefExprBits
SourceLocation getParameterPackLocation() const
Get the location of the parameter pack.
NestedNameSpecifierLoc getQualifierLoc() const
ExplicitCastExpr - An explicit cast written in the source code.
const DeclarationNameInfo & getMemberNameInfo() const
Retrieve the full name info for the member that this expression refers to.
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
Expr * getPlacementArg(unsigned I)
const_child_range children() const
CXXNullPtrLiteralExpr(EmptyShell Empty)
const_arg_iterator arg_begin() const
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
CXXNewExprBitfields CXXNewExprBits
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
SourceLocation getColonColonLoc() const
Retrieve the location of the '::' in a qualified pseudo-destructor expression.
SourceLocation getBeginLoc() const
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source location information.
const_child_range children() const
CXXConstructExprBitfields CXXConstructExprBits
TemplateArgumentLoc * getTrailingTemplateArgumentLoc()
Return the optional template arguments.
Location wrapper for a TemplateArgument.
bool hasTemplateKeyword() const
Determines whether the name was preceded by the template keyword.
Iterator for iterating over Stmt * arrays that contain only T *.
SourceLocation getExprLoc() const LLVM_READONLY
Return the preferred location (the member name) for the arrow when diagnosing a problem with this exp...
static bool classof(const Stmt *T)
unsigned getNumObjects() const
CoroutineSuspendExpr(StmtClass SC, EmptyShell Empty)
SourceLocation getRParenLoc() const
Determine the location of the right parenthesis.
SourceLocation getBeginLoc() const LLVM_READONLY
Represents a call to a CUDA kernel function.
Represents a 'co_await' expression.
TypeTraitExprBitfields TypeTraitExprBits
MaterializeTemporaryExpr(QualType T, Expr *Temporary, bool BoundToLvalueReference)
void setParenOrBraceRange(SourceRange Range)
Expr * getReplacement() const
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
void setArg(unsigned Arg, Expr *ArgExpr)
Set the specified argument.
static bool classof(const Stmt *T)
CXXInheritedCtorInitExpr(SourceLocation Loc, QualType T, CXXConstructorDecl *Ctor, bool ConstructsVirtualBase, bool InheritedFromVirtualBase)
Construct a C++ inheriting construction expression.
SourceRange getDirectInitRange() const
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the member name, with source location information...
Expr * getArg(unsigned Arg)
Return the specified argument.
CXXBoolLiteralExprBitfields CXXBoolLiteralExprBits
static bool classof(const Stmt *T)
llvm::iterator_range< arg_iterator > arg_range
static bool classof(const Stmt *T)
static bool isAssignmentOp(OverloadedOperatorKind Opc)
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '...
CXXThrowExpr(EmptyShell Empty)
arg_iterator placement_arg_begin()
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof...
Represents an expression that might suspend coroutine execution; either a co_await or co_yield expres...
unsigned arg_size() const
Retrieve the number of arguments.
void setLParenLoc(SourceLocation L)
llvm::iterator_range< decls_iterator > decls() const
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
Expr * getResumeExpr() const
A use of a default initializer in a constructor or in aggregate initialization.
bool isListInitialization() const
Determine whether this expression models list-initialization.
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
OverloadExprBitfields OverloadExprBits
void setLocation(SourceLocation L)
StringRef getUuidStr() const
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
bool allowFPContractWithinStatement() const
const Expr * getSubExpr() const
SourceLocation getBeginLoc() const
CoroutineSuspendExpr(StmtClass SC, SourceLocation KeywordLoc, QualType Ty, Expr *Common)
Defines the clang::SourceLocation class and associated facilities.
BuiltinBitCastExpr(QualType T, ExprValueKind VK, CastKind CK, Expr *SrcExpr, TypeSourceInfo *DstType, SourceLocation KWLoc, SourceLocation RParenLoc)
Represents a C++ struct/union/class.
SourceLocation getExprLoc() const LLVM_READONLY
const CXXTemporary * getTemporary() const
CXXDefaultArgExprBitfields CXXDefaultArgExprBits
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
static bool classof(const Stmt *T)
Expr * getOperand() const
ExpressionTraitExpr(EmptyShell Empty)
CXXOperatorCallExprBitfields CXXOperatorCallExprBits
SourceRange getParenOrBraceRange() const
CleanupObject getObject(unsigned i) const
const_arg_iterator raw_arg_end() const
SourceLocation getLParenLoc() const
bool containsUnexpandedParameterPack() const
Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates)...
SourceLocation getEndLoc() const
unsigned kind
All of the diagnostics that can be emitted by the frontend.
Optional< unsigned > getNumExpansions() const
Determine the number of expansions that will be produced when this pack expansion is instantiated...
const DeclContext * getUsedContext() const
void setExprOperand(Expr *E)
SourceLocation getEllipsisLoc() const
static CXXDefaultArgExpr * Create(const ASTContext &C, SourceLocation Loc, ParmVarDecl *Param, DeclContext *UsedContext)
const_child_range children() const
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
bool isGlobalDelete() const
bool isImplicitCXXThis() const
Whether this expression is an implicit reference to 'this' in C++.
Expr * getBase() const
Retrieve the base object of this member expressions, e.g., the x in x.m.
Full-expression storage duration (for temporaries).
bool hasExplicitParameters() const
Determine whether this lambda has an explicit parameter list vs.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
CXXUuidofExpr(EmptyShell Empty, bool isExpr)
const_child_range children() const
SourceRange getTypeIdParens() const
Expr * getPattern()
Retrieve the pattern of the pack expansion.
const_child_range children() const
bool hasTemplateKWAndArgsInfo() const
const Expr * getArg(unsigned I) const
CXXTypeidExpr(EmptyShell Empty, bool isExpr)
static bool classof(const Stmt *T)
Abstract class common to all of the C++ "named"/"keyword" casts.
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
const ParmVarDecl * getParam() const
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
SourceLocation getBeginLoc() const
SourceLocation getEndLoc() const
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument for this lambda expression...
SourceLocation getEndLoc() const LLVM_READONLY
static bool classof(const Stmt *T)
NestedNameSpecifierLoc getQualifierLoc() const
Fetches the nested-name qualifier with source-location information, if one was given.
Expr *const * const_capture_init_iterator
Const iterator that walks over the capture initialization arguments.
const CXXRecordDecl * getNamingClass() const
Expr * getOperand() const
const ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo() const
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding the member name, if any.
CoawaitExpr(SourceLocation CoawaitLoc, Expr *Operand, Expr *Ready, Expr *Suspend, Expr *Resume, OpaqueValueExpr *OpaqueValue, bool IsImplicit=false)
CXXThisExpr(SourceLocation L, QualType Ty, bool IsImplicit)
bool hadMultipleCandidates() const
Whether the referred constructor was resolved from an overloaded set having size greater than 1...
An instance of this class represents the declaration of a property member.
CXXNoexceptExprBitfields CXXNoexceptExprBits
QualType getTypeAsWritten() const
Retrieve the type that is being constructed, as specified in the source code.
An l-value expression is a reference to an object with independent storage.
unsigned getNumArgs() const
Return the number of arguments to the constructor call.
A trivial tuple used to represent a source range.
DependentCoawaitExpr(EmptyShell Empty)
This represents a decl that may have a name.
A boolean literal, per ([C++ lex.bool] Boolean literals).
static bool classof(const Stmt *T)
SourceLocation getBeginLoc() const LLVM_READONLY
CXXPseudoDestructorExpr(EmptyShell Shell)
Expr * getQueriedExpression() const
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
SourceLocation getRParenLoc() const
Automatic storage duration (most local variables).
void setStdInitListInitialization(bool V)
unsigned getNumTemplateArgs() const
static bool classof(const Stmt *T)
SourceLocation LAngleLoc
The source location of the left angle bracket ('<').
static bool classof(const Stmt *T)
const_arg_iterator arg_end() const
SourceLocation getBegin() const
BinaryOperatorKind getOperator() const
NamedDecl * getPack() const
Retrieve the parameter pack.
decls_iterator decls_end() const
SourceLocation getKeywordLoc() const
QualType getBaseType() const
Expr * getBaseExpr() const
static bool classof(const Stmt *T)
CXXThisExpr(EmptyShell Empty)
llvm::iterator_range< capture_iterator > capture_range
An iterator over a range of lambda captures.
const_arg_iterator raw_arg_begin() const
operator "" X (unsigned long long)
QualType getType() const
Return the type wrapped by this type source info.
TypeTrait getTrait() const
Determine which type trait this expression uses.
Optional< const Expr * > getArraySize() const
const DeclarationNameInfo & getMemberNameInfo() const
Retrieve the name of the member that this expression refers to.
SourceLocation getEndLoc() const LLVM_READONLY
Expr * IgnoreParens() LLVM_READONLY
Skip past any parentheses which might surround this expression until reaching a fixed point...
const_child_range children() const
ConstructionKind getConstructionKind() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
SourceLocation getEndLoc() const LLVM_READONLY
CXXDependentScopeMemberExprBitfields CXXDependentScopeMemberExprBits
const_child_range children() const
SourceLocation getEndLoc() const LLVM_READONLY
static bool classof(const Stmt *T)
llvm::iterator_range< const_arg_iterator > const_arg_range
bool isOverloaded() const
True if this lookup is overloaded.