15 #ifndef LLVM_CLANG_AST_EXPRCXX_H 16 #define LLVM_CLANG_AST_EXPRCXX_H 38 #include "llvm/ADT/ArrayRef.h" 39 #include "llvm/ADT/None.h" 40 #include "llvm/ADT/Optional.h" 41 #include "llvm/ADT/PointerUnion.h" 42 #include "llvm/ADT/StringRef.h" 43 #include "llvm/ADT/iterator_range.h" 44 #include "llvm/Support/Casting.h" 45 #include "llvm/Support/Compiler.h" 46 #include "llvm/Support/TrailingObjects.h" 58 class NonTypeTemplateParmDecl;
59 class TemplateParameterList;
87 SourceRange getSourceRangeImpl()
const LLVM_READONLY;
96 :
CallExpr(C, CXXOperatorCallExprClass, fn, args, t, VK, operatorloc),
97 Operator(Op), FPFeatures(FPFeatures) {
98 Range = getSourceRangeImpl();
102 :
CallExpr(C, CXXOperatorCallExprClass, Empty) {}
109 return Opc == OO_Equal || Opc == OO_StarEqual ||
110 Opc == OO_SlashEqual || Opc == OO_PercentEqual ||
111 Opc == OO_PlusEqual || Opc == OO_MinusEqual ||
112 Opc == OO_LessLessEqual || Opc == OO_GreaterGreaterEqual ||
113 Opc == OO_AmpEqual || Opc == OO_CaretEqual ||
129 return (Operator < OO_Plus || Operator >= OO_Arrow ||
130 Operator == OO_PlusPlus || Operator == OO_MinusMinus)
168 :
CallExpr(C, CXXMemberCallExprClass, fn, args, t, VK, RP) {}
171 :
CallExpr(C, CXXMemberCallExprClass, Empty) {}
176 Expr *getImplicitObjectArgument()
const;
205 enum { CONFIG, END_PREARG };
211 :
CallExpr(C, CUDAKernelCallExprClass, fn, Config, args, t, VK, RP) {}
214 :
CallExpr(C, CUDAKernelCallExprClass, END_PREARG, Empty) {}
217 return cast_or_null<CallExpr>(
getPreArg(CONFIG));
226 assert(!getConfig() &&
227 "Cannot call setConfig if config is not null");
266 RParenLoc(RParenLoc), AngleBrackets(AngleBrackets) {}
272 const char *getCastName()
const;
287 case CXXStaticCastExprClass:
288 case CXXDynamicCastExprClass:
289 case CXXReinterpretCastExprClass:
290 case CXXConstCastExprClass:
310 writtenTy, l, RParenLoc, AngleBrackets) {}
312 explicit CXXStaticCastExpr(
EmptyShell Empty,
unsigned PathSize)
346 writtenTy, l, RParenLoc, AngleBrackets) {}
348 explicit CXXDynamicCastExpr(
EmptyShell Empty,
unsigned pathSize)
365 bool isAlwaysNull()
const;
383 CXXBaseSpecifier *> {
385 Expr *op,
unsigned pathSize,
390 pathSize, writtenTy, l, RParenLoc, AngleBrackets) {}
392 CXXReinterpretCastExpr(
EmptyShell Empty,
unsigned pathSize)
409 return T->
getStmtClass() == CXXReinterpretCastExprClass;
427 0, writtenTy, l, RParenLoc, AngleBrackets) {}
468 :
CallExpr(C, UserDefinedLiteralClass, Fn, Args, T, VK, LitEndLoc),
469 UDSuffixLoc(SuffixLoc) {}
472 :
CallExpr(C, UserDefinedLiteralClass, Empty) {}
502 Expr *getCookedLiteral();
508 if (getLiteralOperatorKind() == LOK_Template)
538 Value(val), Loc(l) {}
541 :
Expr(CXXBoolLiteralExprClass, Empty) {}
575 :
Expr(CXXNullPtrLiteralExprClass, Empty) {}
595 Stmt *SubExpr =
nullptr;
598 :
Expr(CXXStdInitializerListExprClass, Empty) {}
627 return S->
getStmtClass() == CXXStdInitializerListExprClass;
640 llvm::PointerUnion<Stmt *, TypeSourceInfo *> Operand;
650 Operand->
getType()->isDependentType(),
651 Operand->
getType()->isInstantiationDependentType(),
653 Operand(Operand), Range(R) {}
664 Operand(Operand), Range(R) {}
667 :
Expr(CXXTypeidExprClass, Empty) {
669 Operand = (
Expr*)
nullptr;
676 bool isPotentiallyEvaluated()
const;
686 assert(isTypeOperand() &&
"Cannot call getTypeOperand for typeid(expr)");
691 assert(isTypeOperand() &&
"Cannot call getTypeOperand for typeid(expr)");
696 assert(!isTypeOperand() &&
"Cannot call getExprOperand for typeid(type)");
697 return static_cast<Expr*
>(Operand.get<
Stmt *>());
701 assert(!isTypeOperand() &&
"Cannot call getExprOperand for typeid(type)");
718 Stmt **begin =
reinterpret_cast<Stmt**
>(&Operand);
746 BaseExpr(baseExpr), TheDecl(decl),
747 MemberLoc(nameLoc), IsArrow(isArrow),
748 QualifierLoc(qualifierLoc) {}
757 return getBaseExpr() && getBaseExpr()->isImplicitCXXThis();
761 if (!isImplicitAccess())
763 else if (QualifierLoc)
800 enum { BASE_EXPR, IDX_EXPR, NUM_SUBEXPRS = 2 };
802 Stmt *SubExprs[NUM_SUBEXPRS];
805 void setBase(
Expr *
Base) { SubExprs[BASE_EXPR] = Base; }
806 void setIdx(
Expr *Idx) { SubExprs[IDX_EXPR] = Idx; }
814 RBracketLoc(RBracketLoc) {
815 SubExprs[BASE_EXPR] = Base;
816 SubExprs[IDX_EXPR] = Idx;
821 :
Expr(MSPropertySubscriptExprClass, Shell) {}
824 const Expr *
getBase()
const {
return cast<Expr>(SubExprs[BASE_EXPR]); }
827 const Expr *
getIdx()
const {
return cast<Expr>(SubExprs[IDX_EXPR]); }
830 return getBase()->getLocStart();
839 return getBase()->getExprLoc();
843 return T->
getStmtClass() == MSPropertySubscriptExprClass;
848 return child_range(&SubExprs[0], &SubExprs[0] + NUM_SUBEXPRS);
858 llvm::PointerUnion<Stmt *, TypeSourceInfo *> Operand;
866 Operand->
getType()->isDependentType(),
867 Operand->
getType()->isInstantiationDependentType(),
869 Operand(Operand), UuidStr(UuidStr), Range(R) {}
875 Operand(Operand), UuidStr(UuidStr), Range(R) {}
878 :
Expr(CXXUuidofExprClass, Empty) {
880 Operand = (
Expr*)
nullptr;
893 assert(isTypeOperand() &&
"Cannot call getTypeOperand for __uuidof(expr)");
898 assert(isTypeOperand() &&
"Cannot call getTypeOperand for __uuidof(expr)");
903 assert(!isTypeOperand() &&
"Cannot call getExprOperand for __uuidof(type)");
904 return static_cast<Expr*
>(Operand.get<
Stmt *>());
908 assert(!isTypeOperand() &&
"Cannot call getExprOperand for __uuidof(type)");
928 Stmt **begin =
reinterpret_cast<Stmt**
>(&Operand);
954 Type->isDependentType(), Type->isDependentType(),
955 Type->isInstantiationDependentType(),
957 Loc(L), Implicit(isImplicit) {}
992 unsigned IsThrownVariableInScope : 1;
999 bool IsThrownVariableInScope)
1003 Op(expr), ThrowLoc(l),
1004 IsThrownVariableInScope(IsThrownVariableInScope) {}
1024 return getSubExpr()->getLocEnd();
1057 Param(param), Loc(Loc) {}
1078 return getParam()->getDefaultArg();
1081 return getParam()->getDefaultArg();
1169 : Destructor(destructor) {}
1198 Stmt *SubExpr =
nullptr;
1201 :
Expr(CXXBindTemporaryExprClass, SubExpr->
getType(),
1206 Temp(temp), SubExpr(SubExpr) {}
1210 :
Expr(CXXBindTemporaryExprClass, Empty) {}
1252 unsigned NumArgs : 16;
1253 unsigned Elidable : 1;
1254 unsigned HadMultipleCandidates : 1;
1255 unsigned ListInitialization : 1;
1256 unsigned StdInitListInitialization : 1;
1257 unsigned ZeroInitialization : 1;
1258 unsigned ConstructKind : 2;
1259 Stmt **Args =
nullptr;
1269 bool HadMultipleCandidates,
1270 bool ListInitialization,
1271 bool StdInitListInitialization,
1272 bool ZeroInitialization,
1278 :
Expr(SC, Empty), NumArgs(0), Elidable(
false),
1279 HadMultipleCandidates(
false), ListInitialization(
false),
1280 ZeroInitialization(
false), ConstructKind(0) {}
1294 bool HadMultipleCandidates,
1295 bool ListInitialization,
1296 bool StdInitListInitialization,
1297 bool ZeroInitialization,
1331 ZeroInitialization = ZeroInit;
1366 assert(Arg < NumArgs &&
"Arg access out of range!");
1367 return cast<Expr>(Args[Arg]);
1370 assert(Arg < NumArgs &&
"Arg access out of range!");
1371 return cast<Expr>(Args[Arg]);
1376 assert(Arg < NumArgs &&
"Arg access out of range!");
1377 Args[Arg] = ArgExpr;
1408 unsigned ConstructsVirtualBase : 1;
1412 unsigned InheritedFromVirtualBase : 1;
1420 bool InheritedFromVirtualBase)
1423 Constructor(Ctor), Loc(Loc),
1424 ConstructsVirtualBase(ConstructsVirtualBase),
1425 InheritedFromVirtualBase(InheritedFromVirtualBase) {
1431 :
Expr(CXXInheritedCtorInitExprClass, Empty),
1432 ConstructsVirtualBase(
false), InheritedFromVirtualBase(
false) {}
1456 return T->
getStmtClass() == CXXInheritedCtorInitExprClass;
1482 castExpr, pathSize, writtenTy),
1483 LParenLoc(lParenLoc), RParenLoc(rParenLoc) {}
1511 return T->
getStmtClass() == CXXFunctionalCastExprClass;
1542 bool HadMultipleCandidates,
1543 bool ListInitialization,
1544 bool StdInitListInitialization,
1545 bool ZeroInitialization);
1555 return T->
getStmtClass() == CXXTemporaryObjectExprClass;
1589 unsigned NumCaptures : 16;
1593 unsigned CaptureDefault : 2;
1597 unsigned ExplicitParams : 1;
1600 unsigned ExplicitResultType : 1;
1616 bool ExplicitParams,
bool ExplicitResultType,
1618 bool ContainsUnexpandedParameterPack);
1622 :
Expr(LambdaExprClass, Empty), NumCaptures(NumCaptures),
1623 CaptureDefault(
LCD_None), ExplicitParams(
false),
1624 ExplicitResultType(
false) {
1625 getStoredStmts()[NumCaptures] =
nullptr;
1628 Stmt **getStoredStmts() {
return getTrailingObjects<Stmt *>(); }
1630 Stmt *
const *getStoredStmts()
const {
return getTrailingObjects<Stmt *>(); }
1643 SourceLocation ClosingBrace,
bool ContainsUnexpandedParameterPack);
1648 unsigned NumCaptures);
1657 return CaptureDefaultLoc;
1715 return llvm::make_range(capture_init_begin(), capture_init_end());
1720 return llvm::make_range(capture_init_begin(), capture_init_end());
1726 return reinterpret_cast<Expr **
>(getStoredStmts());
1732 return reinterpret_cast<Expr *
const *
>(getStoredStmts());
1738 return capture_init_begin() + NumCaptures;
1744 return capture_init_begin() + NumCaptures;
1775 bool isMutable()
const;
1796 return child_range(getStoredStmts(), getStoredStmts() + NumCaptures + 1);
1814 false,
false, Type->isInstantiationDependentType(),
1816 RParenLoc(rParenLoc), TypeInfo(TypeInfo) {}
1819 :
Expr(CXXScalarValueInitExprClass, Shell) {}
1831 return T->
getStmtClass() == CXXScalarValueInitExprClass;
1848 Stmt **SubExprs =
nullptr;
1871 unsigned GlobalNew : 1;
1877 unsigned PassAlignment : 1;
1881 unsigned UsualArrayDeleteWantsSize : 1;
1884 unsigned NumPlacementArgs : 26;
1889 unsigned StoredInitializationStyle : 2;
1911 :
Expr(CXXNewExprClass, Shell) {}
1913 void AllocateArgsArray(
const ASTContext &
C,
bool isArray,
1914 unsigned numPlaceArgs,
bool hasInitializer);
1917 assert(
getType()->isPointerType());
1922 return AllocatedTypeInfo;
1940 bool shouldNullCheckAllocation(
const ASTContext &Ctx)
const;
1950 return Array ? cast<Expr>(SubExprs[0]) :
nullptr;
1953 return Array ? cast<Expr>(SubExprs[0]) :
nullptr;
1959 return reinterpret_cast<Expr **
>(SubExprs + Array + hasInitializer());
1963 assert(i < NumPlacementArgs &&
"Index out of range");
1964 return getPlacementArgs()[i];
1967 assert(i < NumPlacementArgs &&
"Index out of range");
1968 return const_cast<CXXNewExpr*
>(
this)->getPlacementArg(i);
1981 if (StoredInitializationStyle == 0)
1988 return hasInitializer() ? cast<Expr>(SubExprs[Array]) :
nullptr;
1991 return hasInitializer() ? cast<Expr>(SubExprs[Array]) :
nullptr;
1996 return dyn_cast_or_null<CXXConstructExpr>(getInitializer());
2002 return PassAlignment;
2009 return UsualArrayDeleteWantsSize;
2016 return llvm::make_range(placement_arg_begin(), placement_arg_end());
2020 return llvm::make_range(placement_arg_begin(), placement_arg_end());
2024 return SubExprs + Array + hasInitializer();
2027 return SubExprs + Array + hasInitializer() + getNumPlacementArgs();
2030 return SubExprs + Array + hasInitializer();
2033 return SubExprs + Array + hasInitializer() + getNumPlacementArgs();
2040 return SubExprs + Array + hasInitializer() + getNumPlacementArgs();
2044 return SubExprs + Array + hasInitializer() + getNumPlacementArgs();
2065 return child_range(raw_arg_begin(), raw_arg_end());
2076 Stmt *Argument =
nullptr;
2082 bool GlobalDelete : 1;
2090 bool ArrayFormAsWritten : 1;
2094 bool UsualArrayDeleteWantsSize : 1;
2100 bool arrayFormAsWritten,
bool usualArrayDeleteWantsSize,
2105 OperatorDelete(operatorDelete), Argument(arg), Loc(loc),
2106 GlobalDelete(globalDelete),
2107 ArrayForm(arrayForm), ArrayFormAsWritten(arrayFormAsWritten),
2108 UsualArrayDeleteWantsSize(usualArrayDeleteWantsSize) {}
2120 return UsualArrayDeleteWantsSize;
2149 llvm::PointerUnion<TypeSourceInfo *, IdentifierInfo *>
Type;
2158 : Type(II), Location(Loc) {}
2238 :
Expr(CXXPseudoDestructorExprClass, Shell), IsArrow(
false) {}
2324 return T->
getStmtClass() == CXXPseudoDestructorExprClass;
2358 size_t numTrailingObjects(OverloadToken<TypeSourceInfo *>)
const {
2392 assert(I <
getNumArgs() &&
"Argument out-of-range");
2398 return llvm::makeArrayRef(getTrailingObjects<TypeSourceInfo *>(),
2442 virtual void anchor();
2452 (queried->
getType()->isInstantiationDependentType() ||
2455 ATT(att), Value(value), Dimension(dimension),
2456 Loc(loc), RParen(rparen), QueriedType(queried) {}
2459 :
Expr(ArrayTypeTraitExprClass, Empty), ATT(0) {}
2507 Expr* QueriedExpression =
nullptr;
2513 Expr *queried,
bool value,
2521 ET(et),
Value(value), Loc(loc), RParen(rparen),
2522 QueriedExpression(queried) {}
2561 unsigned NumResults = 0;
2566 bool HasTemplateKWAndArgsInfo =
false;
2574 bool KnownDependent,
2575 bool KnownInstantiationDependent,
2576 bool KnownContainsUnexpandedParameterPack);
2582 getTrailingASTTemplateKWAndArgsInfo();
2587 ->getTrailingASTTemplateKWAndArgsInfo();
2618 if (isa<UnaryOperator>(E)) {
2619 assert(cast<UnaryOperator>(E)->
getOpcode() == UO_AddrOf);
2620 E = cast<UnaryOperator>(E)->getSubExpr();
2623 Result.HasFormOfMemberPointer = (E == Ovl && Ovl->
getQualifier());
2624 Result.IsAddressOfOperand =
true;
2625 Result.Expression = Ovl;
2627 Result.HasFormOfMemberPointer =
false;
2628 Result.IsAddressOfOperand =
false;
2629 Result.Expression = cast<OverloadExpr>(E);
2644 llvm::iterator_range<decls_iterator>
decls()
const {
2645 return llvm::make_range(decls_begin(), decls_end());
2673 return getTrailingASTTemplateKWAndArgsInfo()->
TemplateKWLoc;
2680 return getTrailingASTTemplateKWAndArgsInfo()->
LAngleLoc;
2687 return getTrailingASTTemplateKWAndArgsInfo()->
RAngleLoc;
2697 if (!hasExplicitTemplateArgs())
2699 return const_cast<OverloadExpr *
>(
this)->getTrailingTemplateArgumentLoc();
2703 if (!hasExplicitTemplateArgs())
2710 return {getTemplateArgs(), getNumTemplateArgs()};
2715 if (hasExplicitTemplateArgs())
2716 getTrailingASTTemplateKWAndArgsInfo()->
copyInto(getTemplateArgs(), List);
2720 return T->
getStmtClass() == UnresolvedLookupExprClass ||
2739 UnresolvedLookupExpr, ASTTemplateKWAndArgsInfo, TemplateArgumentLoc> {
2747 bool RequiresADL =
false;
2751 bool Overloaded =
false;
2765 bool RequiresADL,
bool Overloaded,
2768 :
OverloadExpr(UnresolvedLookupExprClass, C, QualifierLoc, TemplateKWLoc,
2770 RequiresADL(RequiresADL),
2771 Overloaded(Overloaded), NamingClass(NamingClass) {}
2776 size_t numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
2777 return HasTemplateKWAndArgsInfo ? 1 : 0;
2785 bool ADL,
bool Overloaded,
2790 ADL, Overloaded,
nullptr,
Begin,
End);
2804 bool HasTemplateKWAndArgsInfo,
2805 unsigned NumTemplateArgs);
2821 return l.getBeginLoc();
2822 return getNameInfo().getLocStart();
2826 if (hasExplicitTemplateArgs())
2827 return getRAngleLoc();
2828 return getNameInfo().getLocEnd();
2857 ASTTemplateKWAndArgsInfo,
2858 TemplateArgumentLoc> {
2868 bool HasTemplateKWAndArgsInfo;
2876 size_t numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
2877 return HasTemplateKWAndArgsInfo ? 1 : 0;
2892 bool HasTemplateKWAndArgsInfo,
2893 unsigned NumTemplateArgs);
2920 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->TemplateKWLoc;
2927 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->LAngleLoc;
2934 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->RAngleLoc;
2946 if (hasExplicitTemplateArgs())
2947 getTrailingObjects<ASTTemplateKWAndArgsInfo>()->copyInto(
2948 getTrailingObjects<TemplateArgumentLoc>(), List);
2952 if (!hasExplicitTemplateArgs())
2955 return getTrailingObjects<TemplateArgumentLoc>();
2959 if (!hasExplicitTemplateArgs())
2962 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->NumTemplateArgs;
2966 return {getTemplateArgs(), getNumTemplateArgs()};
2976 if (hasExplicitTemplateArgs())
2977 return getRAngleLoc();
2978 return getLocation();
2982 return T->
getStmtClass() == DependentScopeDeclRefExprClass;
3022 unsigned numObjects);
3025 bool CleanupsHaveSideEffects,
3029 return llvm::makeArrayRef(getTrailingObjects<CleanupObject>(),
3036 assert(i < getNumObjects() &&
"Index out of range");
3037 return getObjects()[i];
3111 :
Expr(CXXUnresolvedConstructExprClass, Empty), NumArgs(NumArgs) {}
3162 assert(I < NumArgs &&
"Argument index out-of-range");
3167 assert(I < NumArgs &&
"Argument index out-of-range");
3172 assert(I < NumArgs &&
"Argument index out-of-range");
3179 if (!RParenLoc.
isValid() && NumArgs > 0)
3185 return T->
getStmtClass() == CXXUnresolvedConstructExprClass;
3205 ASTTemplateKWAndArgsInfo,
3206 TemplateArgumentLoc> {
3221 bool HasTemplateKWAndArgsInfo : 1;
3244 size_t numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
3245 return HasTemplateKWAndArgsInfo ? 1 : 0;
3278 unsigned NumTemplateArgs);
3283 bool isImplicitAccess()
const;
3288 assert(!isImplicitAccess());
3289 return cast<Expr>(Base);
3323 return FirstQualifierFoundInScope;
3329 return MemberNameInfo;
3344 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->TemplateKWLoc;
3351 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->LAngleLoc;
3358 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->RAngleLoc;
3371 if (hasExplicitTemplateArgs())
3372 getTrailingObjects<ASTTemplateKWAndArgsInfo>()->copyInto(
3373 getTrailingObjects<TemplateArgumentLoc>(), List);
3379 if (!hasExplicitTemplateArgs())
3382 return getTrailingObjects<TemplateArgumentLoc>();
3388 if (!hasExplicitTemplateArgs())
3391 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->NumTemplateArgs;
3395 return {getTemplateArgs(), getNumTemplateArgs()};
3399 if (!isImplicitAccess())
3402 return getQualifierLoc().getBeginLoc();
3407 if (hasExplicitTemplateArgs())
3408 return getRAngleLoc();
3413 return T->
getStmtClass() == CXXDependentScopeMemberExprClass;
3418 if (isImplicitAccess())
3442 UnresolvedMemberExpr, ASTTemplateKWAndArgsInfo, TemplateArgumentLoc> {
3453 bool HasUnresolvedUsing : 1;
3478 HasUnresolvedUsing(
false) {}
3480 size_t numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
3481 return HasTemplateKWAndArgsInfo ? 1 : 0;
3497 unsigned NumTemplateArgs);
3503 bool isImplicitAccess()
const;
3508 assert(!isImplicitAccess());
3509 return cast<Expr>(Base);
3512 assert(!isImplicitAccess());
3513 return cast<Expr>(Base);
3549 if (!isImplicitAccess())
3552 return l.getBeginLoc();
3553 return getMemberNameInfo().getLocStart();
3557 if (hasExplicitTemplateArgs())
3558 return getRAngleLoc();
3559 return getMemberNameInfo().getLocEnd();
3568 if (isImplicitAccess())
3576 if (!HasTemplateKWAndArgsInfo)
3579 if (isa<UnresolvedLookupExpr>(
this))
3580 return cast<UnresolvedLookupExpr>(
this)
3581 ->getTrailingObjects<ASTTemplateKWAndArgsInfo>();
3583 return cast<UnresolvedMemberExpr>(
this)
3584 ->getTrailingObjects<ASTTemplateKWAndArgsInfo>();
3588 if (isa<UnresolvedLookupExpr>(
this))
3589 return cast<UnresolvedLookupExpr>(
this)
3590 ->getTrailingObjects<TemplateArgumentLoc>();
3592 return cast<UnresolvedMemberExpr>(
this)
3593 ->getTrailingObjects<TemplateArgumentLoc>();
3615 Value(Val ==
CT_Cannot), Operand(Operand), Range(Keyword, RParen) {}
3663 unsigned NumExpansions;
3674 EllipsisLoc(EllipsisLoc),
3675 NumExpansions(NumExpansions ? *NumExpansions + 1 : 0),
3694 return NumExpansions - 1;
3764 OperatorLoc(OperatorLoc), PackLoc(PackLoc), RParenLoc(RParenLoc),
3765 Length(Length ? *Length : PartialArgs.size()), Pack(Pack) {
3766 assert((!Length || PartialArgs.empty()) &&
3767 "have partial args for non-dependent sizeof... expression");
3769 std::uninitialized_copy(PartialArgs.begin(), PartialArgs.end(), Args);
3774 :
Expr(SizeOfPackExprClass, Empty), Length(NumPartialArgs) {}
3783 unsigned NumPartialArgs);
3803 "Cannot get the length of a value-dependent pack size expression");
3818 assert(isPartiallySubstituted());
3820 return llvm::makeArrayRef(Args, Args + Length);
3852 :
Expr(SubstNonTypeTemplateParmExprClass, Empty) {}
3860 :
Expr(SubstNonTypeTemplateParmExprClass, type, valueKind,
OK_Ordinary,
3864 Param(param), Replacement(replacement), NameLoc(loc) {}
3875 return s->
getStmtClass() == SubstNonTypeTemplateParmExprClass;
3906 unsigned NumArguments;
3912 :
Expr(SubstNonTypeTemplateParmPackExprClass, Empty) {}
3934 return T->
getStmtClass() == SubstNonTypeTemplateParmPackExprClass;
3971 unsigned NumParameters;
3983 unsigned NumParams);
4049 unsigned ManglingNumber;
4051 llvm::PointerUnion<Stmt *, ExtraState *>
State;
4053 void initializeExtraState(
const ValueDecl *ExtendedBy,
4054 unsigned ManglingNumber);
4058 bool BoundToLvalueReference)
4059 :
Expr(MaterializeTemporaryExprClass, T,
4067 :
Expr(MaterializeTemporaryExprClass, Empty) {}
4070 return State.is<
Stmt *>() ? State.get<
Stmt *>()
4071 : State.get<ExtraState *>()->Temporary;
4080 const ValueDecl *ExtendingDecl = getExtendingDecl();
4085 if (isa<FieldDecl>(ExtendingDecl))
4089 if (isa<BindingDecl>(ExtendingDecl))
4093 return cast<VarDecl>(ExtendingDecl)->getStorageDuration();
4099 return State.is<
Stmt *>() ?
nullptr 4100 : State.get<ExtraState *>()->ExtendingDecl;
4103 void setExtendingDecl(
const ValueDecl *ExtendedBy,
unsigned ManglingNumber);
4106 return State.is<
Stmt *>() ? 0 : State.get<ExtraState *>()->ManglingNumber;
4116 return getTemporary()->getLocStart();
4120 return getTemporary()->getLocEnd();
4124 return T->
getStmtClass() == MaterializeTemporaryExprClass;
4129 if (State.is<
Stmt *>())
4130 return child_range(State.getAddrOfPtr1(), State.getAddrOfPtr1() + 1);
4132 auto ES = State.get<ExtraState *>();
4133 return child_range(&ES->Temporary, &ES->Temporary + 1);
4162 LParenLoc(LParenLoc), EllipsisLoc(EllipsisLoc), RParenLoc(RParenLoc),
4175 return getLHS() && getLHS()->containsUnexpandedParameterPack();
4224 enum SubExpr { Common, Ready, Suspend, Resume, Count };
4226 Stmt *SubExprs[SubExpr::Count];
4237 KeywordLoc(KeywordLoc), OpaqueValue(OpaqueValue) {
4238 SubExprs[SubExpr::Common] = Common;
4239 SubExprs[SubExpr::Ready] = Ready;
4240 SubExprs[SubExpr::Suspend] = Suspend;
4241 SubExprs[SubExpr::Resume] = Resume;
4248 KeywordLoc(KeywordLoc) {
4250 "wrong constructor for non-dependent co_await/co_yield expression");
4251 SubExprs[SubExpr::Common] = Common;
4252 SubExprs[SubExpr::Ready] =
nullptr;
4253 SubExprs[SubExpr::Suspend] =
nullptr;
4254 SubExprs[SubExpr::Resume] =
nullptr;
4258 SubExprs[SubExpr::Common] =
nullptr;
4259 SubExprs[SubExpr::Ready] =
nullptr;
4260 SubExprs[SubExpr::Suspend] =
nullptr;
4261 SubExprs[SubExpr::Resume] =
nullptr;
4267 return static_cast<Expr*
>(SubExprs[SubExpr::Common]);
4274 return static_cast<Expr*
>(SubExprs[SubExpr::Ready]);
4278 return static_cast<Expr*
>(SubExprs[SubExpr::Suspend]);
4282 return static_cast<Expr*
>(SubExprs[SubExpr::Resume]);
4290 return getCommonExpr()->getLocEnd();
4294 return child_range(SubExprs, SubExprs + SubExpr::Count);
4310 bool IsImplicit =
false)
4312 Suspend, Resume, OpaqueValue) {
4317 bool IsImplicit =
false)
4327 return getCommonExpr();
4353 KeywordLoc(KeywordLoc) {
4357 "wrong constructor for non-dependent co_await/co_yield expression");
4359 SubExprs[1] = OpCoawait;
4363 :
Expr(DependentCoawaitExprClass, Empty) {}
4368 return cast<UnresolvedLookupExpr>(SubExprs[1]);
4376 return getOperand()->getLocEnd();
4394 Suspend, Resume, OpaqueValue) {}
4402 return getCommonExpr();
4412 #endif // LLVM_CLANG_AST_EXPRCXX_H CXXUuidofExpr(QualType Ty, TypeSourceInfo *Operand, StringRef UuidStr, SourceRange R)
SourceLocation getLocStart() const LLVM_READONLY
CoroutineSuspendExpr(StmtClass SC, SourceLocation KeywordLoc, Expr *Common, Expr *Ready, Expr *Suspend, Expr *Resume, OpaqueValueExpr *OpaqueValue)
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 *)
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...
unsigned getNumDecls() const
Gets the number of declarations in the unresolved set.
An instance of this class is created to represent a function declaration or definition.
Represents a 'co_await' expression while the type of the promise is dependent.
void setPreArg(unsigned i, Stmt *PreArg)
Expr ** getArgs()
Retrieve the call arguments.
bool hasExplicitTemplateArgs() const
Determines whether this expression had explicit template arguments.
SourceRange getSourceRange() const LLVM_READONLY
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 getLocStart() const
PointerType - C99 6.7.5.1 - Pointer Declarators.
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
ArrayRef< TemplateArgumentLoc > template_arguments() const
Expr * getArg(unsigned Arg)
getArg - Return the specified argument.
Defines enumerations for the type traits support.
void setLocation(SourceLocation L)
const Expr * getSubExpr() const
Expr(StmtClass SC, QualType T, ExprValueKind VK, ExprObjectKind OK, bool TD, bool VD, bool ID, bool ContainsUnexpandedParameterPack)
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getLocEnd() const LLVM_READONLY
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.
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
CXXDeleteExpr(QualType ty, bool globalDelete, bool arrayForm, bool arrayFormAsWritten, bool usualArrayDeleteWantsSize, FunctionDecl *operatorDelete, Expr *arg, SourceLocation loc)
bool isListInitialization() const
Determine whether this expression models list-initialization.
static UnresolvedLookupExpr * Create(const ASTContext &C, CXXRecordDecl *NamingClass, NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo, bool ADL, bool Overloaded, UnresolvedSetIterator Begin, UnresolvedSetIterator End)
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...
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 getLocStart() const LLVM_READONLY
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 getLocStart() const LLVM_READONLY
ArrayRef< CleanupObject > getObjects() const
CXXOperatorCallExpr(ASTContext &C, OverloadedOperatorKind Op, Expr *fn, ArrayRef< Expr *> args, QualType t, ExprValueKind VK, SourceLocation operatorloc, FPOptions FPFeatures)
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getLocStart() const LLVM_READONLY
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...
SourceLocation getEndLoc() const
QualType getNonReferenceType() const
If Type is a reference type (e.g., const int&), returns the type that the reference refers to ("const...
SourceLocation getLocEnd() const LLVM_READONLY
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...
SourceLocation getBeginLoc() const
getBeginLoc - Retrieve the location of the first token.
static bool classof(const Stmt *T)
SourceLocation getLocation() const
llvm::iterator_range< child_iterator > child_range
SourceLocation getKeywordLoc() const
Represents a call to a C++ constructor.
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent...
static bool classof(const Stmt *S)
A container of type source information.
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 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...
const Expr * getSubExpr() const
void setRParenLoc(SourceLocation L)
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getLocStart() const LLVM_READONLY
SourceRange getSourceRange() const LLVM_READONLY
QualType getBaseType() const
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation getOperatorLoc() const
Retrieve the location of the '.' or '->' operator.
const internal::VariadicDynCastAllOfMatcher< Stmt, Expr > expr
Matches expressions.
UnresolvedLookupExpr * getOperatorCoawaitLookup() const
IdentifierInfo * getIdentifier() const
const T * getAs() const
Member-template getAs<specific type>'.
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
llvm::iterator_range< arg_iterator > arg_range
static bool classof(const Stmt *T)
DeclarationName getName() const
Gets the name looked up.
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.
void setContainsUnexpandedParameterPack(bool PP=true)
Set the bit that describes whether this expression contains an unexpanded parameter pack...
static bool classof(const Stmt *T)
unsigned getNumPlacementArgs() const
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
SourceLocation getLocStart() const LLVM_READONLY
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.
ParmVarDecl - Represents a parameter to a function.
bool isAssignmentOp() const
CXXDefaultArgExpr(EmptyShell Empty)
bool hasQualifier() const
Evalutes true when this nested-name-specifier location is empty.
CoawaitExprBitfields CoawaitBits
A C++ static_cast expression (C++ [expr.static.cast]).
SourceLocation getLocEnd() const LLVM_READONLY
Expr * getExprOperand() const
SourceLocation getRParenLoc() const
Retrieve the location of the closing parenthesis.
CXXConstructExpr(StmtClass SC, EmptyShell Empty)
Construct an empty C++ construction expression.
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getLocEnd() const LLVM_READONLY
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 '~'.
SourceLocation getLocEnd() const LLVM_READONLY
bool cleanupsHaveSideEffects() const
const Expr * getArg(unsigned Arg) 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)
static bool classof(const Stmt *T)
SourceLocation getLocStart() const LLVM_READONLY
FieldDecl - An instance of this class is created by Sema::ActOnField to represent a member of a struc...
const FieldDecl * getField() const
llvm::iterator_range< const_arg_iterator > arg_const_range
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. ...
SourceLocation getLocStart() const LLVM_READONLY
NonTypeTemplateParmDecl * getParameter() const
const DeclarationNameInfo & getNameInfo() const
Gets the full name info.
llvm::iterator_range< const_arg_iterator > placement_arguments() const
SourceLocation getLocStart() const LLVM_READONLY
void setRequiresZeroInitialization(bool ZeroInit)
void setArg(unsigned I, Expr *E)
SourceLocation getLocEnd() const LLVM_READONLY
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.
Expr * getPlacementArg(unsigned i)
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...
CXXScalarValueInitExpr(QualType Type, TypeSourceInfo *TypeInfo, SourceLocation rParenLoc)
Create an explicitly-written scalar-value initialization expression.
CXXInheritedCtorInitExpr(EmptyShell Empty)
Construct an empty C++ inheriting construction expression.
SourceLocation getLocStart() const LLVM_READONLY
static bool classof(const Stmt *T)
SourceLocation getLocEnd() 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...
SourceLocation getLocStart() const LLVM_READONLY
LambdaCaptureDefault getCaptureDefault() const
Determine the default capture kind for this lambda.
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.
SourceLocation getLocEnd() const LLVM_READONLY
An r-value expression (a pr-value in the C++11 taxonomy) produces a temporary value.
void setDestroyedType(TypeSourceInfo *Info)
Set the destroyed type.
const Expr *const * const_arg_iterator
SubstNonTypeTemplateParmExpr(QualType type, ExprValueKind valueKind, SourceLocation loc, NonTypeTemplateParmDecl *param, Expr *replacement)
SourceLocation getMemberLoc() const
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
SourceLocation getLocEnd() const
SourceLocation getLocStart() const LLVM_READONLY
MSPropertyRefExpr(Expr *baseExpr, MSPropertyDecl *decl, bool isArrow, QualType ty, ExprValueKind VK, NestedNameSpecifierLoc qualifierLoc, SourceLocation nameLoc)
CXXThisExpr(SourceLocation L, QualType Type, bool isImplicit)
unsigned getNumExpansions() const
Get the number of parameters in this parameter pack.
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getLocStart() 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
static bool classof(const Stmt *T)
bool HasFormOfMemberPointer
SourceLocation getParameterPackLocation() const
Retrieve the location of the parameter pack name.
A convenient class for passing around template argument information.
PseudoDestructorTypeStorage(IdentifierInfo *II, SourceLocation Loc)
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...
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.
SourceLocation getLocStart() const LLVM_READONLY
static bool classof(const Stmt *T)
SourceLocation getEndLoc() const
getEndLoc - Retrieve the location of the last token.
CXXFoldExpr(QualType T, SourceLocation LParenLoc, Expr *LHS, BinaryOperatorKind Opcode, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc)
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...
SourceLocation getThrowLoc() const
static bool classof(const Stmt *T)
SourceLocation getLocStart() const LLVM_READONLY
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
const CallExpr * getConfig() const
FPOptions getFPFeatures() const
New-expression has a C++98 paren-delimited initializer.
bool hasUnparsedDefaultArg() const
hasUnparsedDefaultArg - Determines whether this parameter has a default argument that has not yet bee...
void setListInitialization(bool V)
const Expr * getArraySize() const
NestedNameSpecifier * getQualifier() const
Fetches the nested-name qualifier, if one was given.
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
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)
SourceLocation getLocStart() const LLVM_READONLY
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
SourceLocation getLocEnd() const LLVM_READONLY
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.
DeclarationName getDeclName() const
Retrieve the name that this expression refers to.
An ordinary object is located at an address in memory.
Represents a C++ member access expression where the actual member referenced could not be resolved be...
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()
Iterator for iterating over Stmt * arrays that contain only Expr *.
CoyieldExpr(SourceLocation CoyieldLoc, Expr *Operand, Expr *Ready, Expr *Suspend, Expr *Resume, OpaqueValueExpr *OpaqueValue)
SourceLocation getMemberLoc() const
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++.
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
arg_const_range arguments() const
bool isRightFold() const
Does this produce a right-associated sequence of operators?
UserDefinedLiteral(const ASTContext &C, EmptyShell Empty)
CXXScalarValueInitExpr(EmptyShell Shell)
Const iterator for iterating over Stmt * arrays that contain only Expr *.
const ValueDecl * getExtendingDecl() const
Get the declaration which triggered the lifetime-extension of this temporary, if any.
TypeSourceInfo * getTypeSourceInfo() const
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]).
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)
CastKind
CastKind - The kind of operation required for a conversion.
SourceLocation getLocStart() const LLVM_READONLY
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)
SourceLocation getLocEnd() const LLVM_READONLY
Stmt * getPreArg(unsigned i)
static bool classof(const Stmt *T)
SourceLocation getLocation() const
SourceLocation getRBracketLoc() const
SourceLocation getLocStart() const LLVM_READONLY
ArrayRef< TypeSourceInfo * > getArgs() const
Retrieve the argument types.
static CXXDefaultArgExpr * Create(const ASTContext &C, SourceLocation Loc, ParmVarDecl *Param)
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getDestroyedTypeLoc() const
Retrieve the starting location of the type being destroyed.
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.
SourceLocation getLocEnd() const LLVM_READONLY
SourceRange getSourceRange() const LLVM_READONLY
BlockDecl - This represents a block literal declaration, which is like an unnamed FunctionDecl...
static bool classof(const Stmt *T)
ValueDecl - Represent the declaration of a variable (in which case it is an lvalue) a function (in wh...
Expr - This represents one expression.
Defines the clang::LangOptions interface.
static bool classof(const Stmt *T)
SourceLocation getLocEnd() const LLVM_READONLY
void setIsImplicit(bool value=true)
SourceLocation getLocStart() const LLVM_READONLY
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
SourceLocation getCaptureDefaultLoc() const
Retrieve the location of this lambda's capture-default, if any.
TemplateArgumentLoc const * getTemplateArgs() const
SourceLocation getLocEnd() const LLVM_READONLY
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '...
const FunctionProtoType * T
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.
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.
const Expr * getCallee() const
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
decls_iterator decls_begin() const
static bool classof(const Stmt *T)
SourceLocation getLocStart() const LLVM_READONLY
ExprWithCleanupsBitfields ExprWithCleanupsBits
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
SourceLocation getExprLoc() const LLVM_READONLY
static OMPLinearClause * CreateEmpty(const ASTContext &C, unsigned NumVars)
Creates an empty clause with the place for NumVars variables.
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.
static bool classof(const Stmt *T)
const Expr * getBase() const
SourceLocation getEnd() const
SourceLocation getLocEnd() 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...
CXXMemberCallExpr(ASTContext &C, EmptyShell Empty)
The result type of a method or function.
ParmVarDecl *const * iterator
Iterators over the parameters which the parameter pack expanded into.
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)
SourceLocation getLocStart() const LLVM_READONLY
DependentCoawaitExpr(SourceLocation KeywordLoc, QualType Ty, Expr *Op, UnresolvedLookupExpr *OpCoawait)
CXXNewExpr(EmptyShell Shell)
MSPropertySubscriptExpr(Expr *Base, Expr *Idx, QualType Ty, ExprValueKind VK, ExprObjectKind OK, SourceLocation RBracketLoc)
SourceRange getSourceRange() const
static bool classof(const Stmt *T)
ExprObjectKind getObjectKind() const
getObjectKind - The object kind that this expression produces.
static bool classof(const Stmt *T)
SourceLocation getOperatorLoc() const
Retrieve the location of the '->' or '.' operator.
void setTypeOperandSourceInfo(TypeSourceInfo *TSI)
const Expr * getArgument() const
SourceLocation getLParenLoc() const
Retrieve the location of the left parentheses ('(') that precedes the argument list.
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.
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
SourceLocation getLocEnd() const LLVM_READONLY
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.
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...
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getLocStart() const LLVM_READONLY
Raw form: operator "" X<cs...> ()
SourceLocation getNameLoc() const
Gets the location of the name.
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.
const_arg_iterator placement_arg_begin() const
SourceLocation getLocEnd() const LLVM_READONLY
Defines enumerations for expression traits intrinsics.
static bool classof(const Stmt *T)
CXXNamedCastExpr(StmtClass SC, QualType ty, ExprValueKind VK, CastKind kind, Expr *op, unsigned PathSize, TypeSourceInfo *writtenTy, SourceLocation l, SourceLocation RParenLoc, SourceRange AngleBrackets)
Represents a C++ temporary.
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...
SourceLocation getLocEnd() const LLVM_READONLY
NestedNameSpecifierLoc getQualifierLoc() const
Retrieves the nested-name-specifier that qualifies the type name, with source-location information...
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)"...
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)
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 ...
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.
SourceLocation getLocStart() const LLVM_READONLY
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 RAngleLoc
The source location of the right angle bracket ('>').
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
bool isFPContractableWithinStatement() const
void setDestructor(const CXXDestructorDecl *Dtor)
QualType getAllocatedType() const
bool isBoundToLvalueReference() const
Determine whether this materialized temporary is bound to an lvalue reference; otherwise, it's bound to an rvalue reference.
Expr * getSuspendExpr() const
void setConfig(CallExpr *E)
Sets the kernel configuration expression.
CUDAKernelCallExpr(ASTContext &C, Expr *fn, CallExpr *Config, ArrayRef< Expr *> args, QualType t, ExprValueKind VK, SourceLocation RP)
unsigned capture_size() const
Determine the number of captures in this lambda.
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]).
CXXNamedCastExpr(StmtClass SC, EmptyShell Shell, unsigned PathSize)
static CXXDefaultInitExpr * Create(const ASTContext &C, SourceLocation Loc, FieldDecl *Field)
Field is the non-static data member whose default initializer is used by this expression.
SourceLocation getLocEnd() const LLVM_READONLY
bool hasTemplateKeyword() const
Determines whether the member name was preceded by the template keyword.
OverloadExpr(StmtClass K, EmptyShell Empty)
bool isParenTypeId() const
bool isInfixBinaryOp() const
Is this written as an infix binary operator?
bool isImplicitAccess() const
An expression trait intrinsic.
CXXOperatorCallExpr(ASTContext &C, EmptyShell Empty)
SourceLocation getLocStart() const LLVM_READONLY
ArrayRef< TemplateArgumentLoc > template_arguments() const
CoyieldExpr(SourceLocation CoyieldLoc, QualType Ty, Expr *Operand)
ParmVarDecl * getExpansion(unsigned I) const
Get an expansion of the parameter pack by index.
bool passAlignment() const
Indicates whether the required alignment should be implicitly passed to the allocation function...
FunctionDecl * getOperatorDelete() const
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)
SourceLocation getLocEnd() const LLVM_READONLY
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.
SourceLocation getLocEnd() const LLVM_READONLY
ArrayRef< TemplateArgument > getPartialArguments() const
Get.
SourceLocation getLocStart() const LLVM_READONLY
Represents a reference to a function parameter pack that has been substituted but not yet expanded...
Represents a template argument.
unsigned getManglingNumber() const
SourceLocation getMemberLoc() const
TypeSourceInfo * getDestroyedTypeInfo() const
Retrieve the source location information for the type being destroyed.
bool isTypeOperand() const
CXXTemporaryObjectExpr(EmptyShell Empty)
SourceLocation getLocation() const
static bool classof(const Stmt *T)
Dataflow Directional Tag Classes.
SourceLocation getLocStart() const LLVM_READONLY
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 getLocEnd() const LLVM_READONLY
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
CXXMemberCallExpr(ASTContext &C, Expr *fn, ArrayRef< Expr *> args, QualType t, ExprValueKind VK, SourceLocation RP)
SourceLocation getLocEnd() const LLVM_READONLY
static bool classof(const Stmt *T)
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)
CXXFoldExpr(EmptyShell Empty)
Reads an AST files chain containing the contents of a translation unit.
SourceLocation getLocStart() const LLVM_READONLY
BinaryOperator::Opcode getOpcode(const SymExpr *SE)
const Expr * getPattern() const
Retrieve the pattern of the pack expansion.
TypeSourceInfo * getTypeSourceInfo() const
Retrieve the type source information for the type being constructed.
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
CXXNoexceptExpr(QualType Ty, Expr *Operand, CanThrowResult Val, SourceLocation Keyword, SourceLocation RParen)
TypeSourceInfo * getTypeSourceInfo() const
SourceLocation getLocEnd() const LLVM_READONLY
Represents a 'co_yield' expression.
void setConstructionKind(ConstructionKind CK)
DeclarationName getMember() const
Retrieve the name of the member that this expression refers to.
DeclarationName - 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
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)
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getLocEnd() const LLVM_READONLY
void setInstantiationDependent(bool ID)
Set whether this expression is instantiation-dependent or not.
llvm::iterator_range< const_arg_iterator > arg_const_range
SourceLocation getParameterPackLocation() const
Get the location of the parameter pack.
CXXNullPtrLiteralExpr(QualType Ty, SourceLocation l)
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...
CXXNullPtrLiteralExpr(EmptyShell Empty)
SourceLocation getLocEnd() const LLVM_READONLY
const_arg_iterator arg_begin() const
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
CXXRecordDecl * getNamingClass() const
Gets the 'naming class' (in the sense of C++0x [class.access.base]p5) of the lookup.
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
SourceLocation getColonColonLoc() const
Retrieve the location of the '::' in a qualified pseudo-destructor expression.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source location information.
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.
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getExprLoc() const LLVM_READONLY
static bool classof(const Stmt *T)
SourceLocation getLocEnd() const LLVM_READONLY
unsigned getNumObjects() const
CoroutineSuspendExpr(StmtClass SC, EmptyShell Empty)
SourceLocation getRParenLoc() const
Determine the location of the right parenthesis.
void setSubExpr(Expr *E)
As with any mutator of the AST, be very careful when modifying an existing AST to preserve its invari...
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...
SourceLocation getLocStart() const LLVM_READONLY
Note: getLocStart() is the start of the whole DependentScopeDeclRefExpr, and differs from getLocation...
Expr * getArg(unsigned Arg)
Return the specified argument.
CXXBoolLiteralExpr(bool val, QualType Ty, SourceLocation l)
static bool classof(const Stmt *T)
SourceLocation getLocStart() const LLVM_READONLY
Default argument expressions have no representation in the source, so they have an empty source range...
static bool classof(const Stmt *T)
static bool isAssignmentOp(OverloadedOperatorKind Opc)
SourceLocation getLocStart() const
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '...
CXXThrowExpr(EmptyShell Empty)
SourceLocation getLocStart() const LLVM_READONLY
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.
SourceLocation getLocEnd() const LLVM_READONLY
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.
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
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
CoroutineSuspendExpr(StmtClass SC, SourceLocation KeywordLoc, QualType Ty, Expr *Common)
Defines the clang::SourceLocation class and associated facilities.
SourceLocation getLocStart() const LLVM_READONLY
UserDefinedLiteral(const ASTContext &C, Expr *Fn, ArrayRef< Expr *> Args, QualType T, ExprValueKind VK, SourceLocation LitEndLoc, SourceLocation SuffixLoc)
Represents a C++ struct/union/class.
SourceLocation getExprLoc() const LLVM_READONLY
SourceLocation getLocStart() const LLVM_READONLY
const CXXTemporary * getTemporary() const
SourceLocation getLocEnd() const LLVM_READONLY
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)
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 getLocEnd() const LLVM_READONLY
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...
void setExprOperand(Expr *E)
SourceLocation getEllipsisLoc() const
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
bool isGlobalDelete() const
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]).
SourceLocation getExprLoc() const LLVM_READONLY
CXXUuidofExpr(EmptyShell Empty, bool isExpr)
SourceRange getTypeIdParens() const
Expr * getPattern()
Retrieve the pattern of the pack expansion.
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...
SourceLocation getLocEnd() const LLVM_READONLY
const ParmVarDecl * getParam() const
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument for this lambda expression...
static bool classof(const Stmt *T)
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.
Expr * getOperand() const
SourceLocation getStartLoc() const
const ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo() const
Return the optional template keyword and arguments info.
CUDAKernelCallExpr(ASTContext &C, EmptyShell Empty)
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)
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.
QualType getTypeAsWritten() const
Retrieve the type that is being constructed, as specified in the source code.
ParmVarDecl * getParameterPack() const
Get the parameter pack which this expression refers to.
An l-value expression is a reference to an object with independent storage.
unsigned getNumArgs() const
A trivial tuple used to represent a source range.
DependentCoawaitExpr(EmptyShell Empty)
NamedDecl - This represents a decl with a name.
A boolean literal, per ([C++ lex.bool] Boolean literals).
static bool classof(const Stmt *T)
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
const Expr * getPlacementArg(unsigned i) 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 getLocStart() const LLVM_READONLY
SourceLocation getBegin() const
CXXThrowExpr(Expr *expr, QualType Ty, SourceLocation l, bool IsThrownVariableInScope)
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.
const DeclarationNameInfo & getMemberNameInfo() const
Retrieve the name of the member that this expression refers to.
CXXConstructExpr(EmptyShell Empty)
Construct an empty C++ construction expression.
Expr * IgnoreParens() LLVM_READONLY
IgnoreParens - Ignore parentheses.
static OMPLinearClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, OpenMPLinearClauseKind Modifier, SourceLocation ModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc, ArrayRef< Expr *> VL, ArrayRef< Expr *> PL, ArrayRef< Expr *> IL, Expr *Step, Expr *CalcStep, Stmt *PreInit, Expr *PostUpdate)
Creates clause with a list of variables VL and a linear step Step.
ConstructionKind getConstructionKind() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
SourceLocation getLocEnd() const LLVM_READONLY
static bool classof(const Stmt *T)
bool isOverloaded() const
True if this lookup is overloaded.