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;
113 return Opc == OO_Equal || Opc == OO_StarEqual || Opc == OO_SlashEqual ||
114 Opc == OO_PercentEqual || Opc == OO_PlusEqual ||
115 Opc == OO_MinusEqual || Opc == OO_LessLessEqual ||
116 Opc == OO_GreaterGreaterEqual || Opc == OO_AmpEqual ||
117 Opc == OO_CaretEqual || Opc == OO_PipeEqual;
133 return (Operator < OO_Plus || Operator >= OO_Arrow ||
134 Operator == OO_PlusPlus || Operator == OO_MinusMinus)
178 CXXMemberCallExpr(
unsigned NumArgs,
EmptyShell Empty);
184 unsigned MinNumArgs = 0);
192 Expr *getImplicitObjectArgument()
const;
220 enum { CONFIG, END_PREARG };
227 unsigned MinNumArgs);
241 return cast_or_null<CallExpr>(
getPreArg(CONFIG));
250 assert(!getConfig() &&
251 "Cannot call setConfig if config is not null");
290 RParenLoc(RParenLoc), AngleBrackets(AngleBrackets) {}
296 const char *getCastName()
const;
311 case CXXStaticCastExprClass:
312 case CXXDynamicCastExprClass:
313 case CXXReinterpretCastExprClass:
314 case CXXConstCastExprClass:
334 writtenTy, l, RParenLoc, AngleBrackets) {}
336 explicit CXXStaticCastExpr(
EmptyShell Empty,
unsigned PathSize)
370 writtenTy, l, RParenLoc, AngleBrackets) {}
372 explicit CXXDynamicCastExpr(
EmptyShell Empty,
unsigned pathSize)
389 bool isAlwaysNull()
const;
407 CXXBaseSpecifier *> {
409 Expr *op,
unsigned pathSize,
414 pathSize, writtenTy, l, RParenLoc, AngleBrackets) {}
416 CXXReinterpretCastExpr(
EmptyShell Empty,
unsigned pathSize)
433 return T->
getStmtClass() == CXXReinterpretCastExprClass;
451 0, writtenTy, l, RParenLoc, AngleBrackets) {}
534 Expr *getCookedLiteral();
540 if (getLiteralOperatorKind() == LOK_Template)
572 :
Expr(CXXBoolLiteralExprClass, Empty) {}
605 :
Expr(CXXNullPtrLiteralExprClass, Empty) {}
625 Stmt *SubExpr =
nullptr;
628 :
Expr(CXXStdInitializerListExprClass, Empty) {}
658 return S->
getStmtClass() == CXXStdInitializerListExprClass;
671 llvm::PointerUnion<Stmt *, TypeSourceInfo *> Operand;
681 Operand->
getType()->isDependentType(),
682 Operand->
getType()->isInstantiationDependentType(),
684 Operand(Operand), Range(R) {}
695 Operand(Operand), Range(R) {}
698 :
Expr(CXXTypeidExprClass, Empty) {
700 Operand = (
Expr*)
nullptr;
707 bool isPotentiallyEvaluated()
const;
717 assert(isTypeOperand() &&
"Cannot call getTypeOperand for typeid(expr)");
722 assert(isTypeOperand() &&
"Cannot call getTypeOperand for typeid(expr)");
727 assert(!isTypeOperand() &&
"Cannot call getExprOperand for typeid(type)");
728 return static_cast<Expr*
>(Operand.get<
Stmt *>());
732 assert(!isTypeOperand() &&
"Cannot call getExprOperand for typeid(type)");
749 auto **begin =
reinterpret_cast<Stmt **
>(&Operand);
777 BaseExpr(baseExpr), TheDecl(decl),
778 MemberLoc(nameLoc), IsArrow(isArrow),
779 QualifierLoc(qualifierLoc) {}
788 return getBaseExpr() && getBaseExpr()->isImplicitCXXThis();
792 if (!isImplicitAccess())
794 else if (QualifierLoc)
831 enum { BASE_EXPR, IDX_EXPR, NUM_SUBEXPRS = 2 };
833 Stmt *SubExprs[NUM_SUBEXPRS];
836 void setBase(
Expr *
Base) { SubExprs[BASE_EXPR] = Base; }
837 void setIdx(
Expr *Idx) { SubExprs[IDX_EXPR] = Idx; }
845 RBracketLoc(RBracketLoc) {
846 SubExprs[BASE_EXPR] = Base;
847 SubExprs[IDX_EXPR] = Idx;
852 :
Expr(MSPropertySubscriptExprClass, Shell) {}
855 const Expr *
getBase()
const {
return cast<Expr>(SubExprs[BASE_EXPR]); }
858 const Expr *
getIdx()
const {
return cast<Expr>(SubExprs[IDX_EXPR]); }
861 return getBase()->getBeginLoc();
870 return getBase()->getExprLoc();
874 return T->
getStmtClass() == MSPropertySubscriptExprClass;
879 return child_range(&SubExprs[0], &SubExprs[0] + NUM_SUBEXPRS);
889 llvm::PointerUnion<Stmt *, TypeSourceInfo *> Operand;
897 Operand->
getType()->isDependentType(),
898 Operand->
getType()->isInstantiationDependentType(),
900 Operand(Operand), UuidStr(UuidStr), Range(R) {}
906 Operand(Operand), UuidStr(UuidStr), Range(R) {}
909 :
Expr(CXXUuidofExprClass, Empty) {
911 Operand = (
Expr*)
nullptr;
924 assert(isTypeOperand() &&
"Cannot call getTypeOperand for __uuidof(expr)");
929 assert(isTypeOperand() &&
"Cannot call getTypeOperand for __uuidof(expr)");
934 assert(!isTypeOperand() &&
"Cannot call getExprOperand for __uuidof(type)");
935 return static_cast<Expr*
>(Operand.get<
Stmt *>());
939 assert(!isTypeOperand() &&
"Cannot call getExprOperand for __uuidof(type)");
959 auto **begin =
reinterpret_cast<Stmt **
>(&Operand);
982 Ty->isDependentType(), Ty->isDependentType(),
983 Ty->isInstantiationDependentType(),
1027 bool IsThrownVariableInScope)
1054 return getThrowLoc();
1055 return getSubExpr()->getEndLoc();
1064 return child_range(&Operand, Operand ? &Operand + 1 : &Operand);
1081 Param->hasUnparsedDefaultArg()
1082 ? Param->
getType().getNonReferenceType()
1083 : Param->getDefaultArg()->
getType(),
1190 : Destructor(destructor) {}
1219 Stmt *SubExpr =
nullptr;
1222 :
Expr(CXXBindTemporaryExprClass, SubExpr->
getType(),
1227 Temp(temp), SubExpr(SubExpr) {}
1231 :
Expr(CXXBindTemporaryExprClass, Empty) {}
1298 inline Stmt **getTrailingArgs();
1299 const Stmt *
const *getTrailingArgs()
const {
1308 bool ListInitialization,
bool StdInitListInitialization,
1318 return NumArgs *
sizeof(
Stmt *);
1326 bool HadMultipleCandidates,
bool ListInitialization,
1327 bool StdInitListInitialization,
bool ZeroInitialization,
1406 return reinterpret_cast<const Expr *
const *
>(getTrailingArgs());
1414 assert(Arg <
getNumArgs() &&
"Arg access out of range!");
1418 assert(Arg <
getNumArgs() &&
"Arg access out of range!");
1424 assert(Arg <
getNumArgs() &&
"Arg access out of range!");
1456 unsigned ConstructsVirtualBase : 1;
1460 unsigned InheritedFromVirtualBase : 1;
1468 bool InheritedFromVirtualBase)
1471 Constructor(Ctor), Loc(Loc),
1472 ConstructsVirtualBase(ConstructsVirtualBase),
1473 InheritedFromVirtualBase(InheritedFromVirtualBase) {
1479 :
Expr(CXXInheritedCtorInitExprClass, Empty),
1480 ConstructsVirtualBase(
false), InheritedFromVirtualBase(
false) {}
1504 return T->
getStmtClass() == CXXInheritedCtorInitExprClass;
1530 castExpr, pathSize, writtenTy),
1531 LParenLoc(lParenLoc), RParenLoc(rParenLoc) {}
1562 return T->
getStmtClass() == CXXFunctionalCastExprClass;
1593 bool HadMultipleCandidates,
bool ListInitialization,
1594 bool StdInitListInitialization,
1595 bool ZeroInitialization);
1603 SourceRange ParenOrBraceRange,
bool HadMultipleCandidates,
1604 bool ListInitialization,
bool StdInitListInitialization,
1605 bool ZeroInitialization);
1616 return T->
getStmtClass() == CXXTemporaryObjectExprClass;
1620 Stmt **CXXConstructExpr::getTrailingArgs() {
1621 if (
auto *E = dyn_cast<CXXTemporaryObjectExpr>(
this))
1622 return reinterpret_cast<Stmt **
>(E + 1);
1624 "Unexpected class deriving from CXXConstructExpr!");
1625 return reinterpret_cast<Stmt **
>(
this + 1);
1658 unsigned NumCaptures : 16;
1662 unsigned CaptureDefault : 2;
1666 unsigned ExplicitParams : 1;
1669 unsigned ExplicitResultType : 1;
1685 bool ExplicitParams,
bool ExplicitResultType,
1687 bool ContainsUnexpandedParameterPack);
1691 :
Expr(LambdaExprClass, Empty), NumCaptures(NumCaptures),
1692 CaptureDefault(
LCD_None), ExplicitParams(
false),
1693 ExplicitResultType(
false) {
1694 getStoredStmts()[NumCaptures] =
nullptr;
1697 Stmt **getStoredStmts() {
return getTrailingObjects<Stmt *>(); }
1699 Stmt *
const *getStoredStmts()
const {
return getTrailingObjects<Stmt *>(); }
1712 SourceLocation ClosingBrace,
bool ContainsUnexpandedParameterPack);
1717 unsigned NumCaptures);
1726 return CaptureDefaultLoc;
1784 return llvm::make_range(capture_init_begin(), capture_init_end());
1789 return llvm::make_range(capture_init_begin(), capture_init_end());
1795 return reinterpret_cast<Expr **
>(getStoredStmts());
1801 return reinterpret_cast<Expr *
const *
>(getStoredStmts());
1807 return capture_init_begin() + NumCaptures;
1813 return capture_init_begin() + NumCaptures;
1844 bool isMutable()
const;
1865 return child_range(getStoredStmts(), getStoredStmts() + NumCaptures + 1);
1882 false, Type->isInstantiationDependentType(),
1884 TypeInfo(TypeInfo) {
1889 :
Expr(CXXScalarValueInitExprClass, Shell) {}
1903 return T->
getStmtClass() == CXXScalarValueInitExprClass;
1951 unsigned arraySizeOffset()
const {
return 0; }
1952 unsigned initExprOffset()
const {
return arraySizeOffset() + isArray(); }
1953 unsigned placementNewArgsOffset()
const {
1954 return initExprOffset() + hasInitializer();
1957 unsigned numTrailingObjects(OverloadToken<Stmt *>)
const {
1958 return isArray() + hasInitializer() + getNumPlacementArgs();
1961 unsigned numTrailingObjects(OverloadToken<SourceRange>)
const {
1962 return isParenTypeId();
1980 FunctionDecl *OperatorDelete,
bool ShouldPassAlignment,
1989 bool IsParenTypeId);
1995 FunctionDecl *OperatorDelete,
bool ShouldPassAlignment,
2004 bool HasInit,
unsigned NumPlacementArgs,
2005 bool IsParenTypeId);
2008 assert(
getType()->isPointerType());
2013 return AllocatedTypeInfo;
2031 bool shouldNullCheckAllocation()
const;
2042 ? cast<Expr>(getTrailingObjects<Stmt *>()[arraySizeOffset()])
2047 ? cast<Expr>(getTrailingObjects<Stmt *>()[arraySizeOffset()])
2056 return reinterpret_cast<Expr **
>(getTrailingObjects<Stmt *>() +
2057 placementNewArgsOffset());
2061 assert((I < getNumPlacementArgs()) &&
"Index out of range!");
2062 return getPlacementArgs()[I];
2065 return const_cast<CXXNewExpr *
>(
this)->getPlacementArg(I);
2070 return isParenTypeId() ? getTrailingObjects<SourceRange>()[0]
2091 return hasInitializer()
2092 ? cast<Expr>(getTrailingObjects<Stmt *>()[initExprOffset()])
2096 return hasInitializer()
2097 ? cast<Expr>(getTrailingObjects<Stmt *>()[initExprOffset()])
2103 return dyn_cast_or_null<CXXConstructExpr>(getInitializer());
2121 return llvm::make_range(placement_arg_begin(), placement_arg_end());
2125 return llvm::make_range(placement_arg_begin(), placement_arg_end());
2129 return getTrailingObjects<Stmt *>() + placementNewArgsOffset();
2132 return placement_arg_begin() + getNumPlacementArgs();
2135 return getTrailingObjects<Stmt *>() + placementNewArgsOffset();
2138 return placement_arg_begin() + getNumPlacementArgs();
2145 return raw_arg_begin() + numTrailingObjects(OverloadToken<Stmt *>());
2148 return getTrailingObjects<Stmt *>();
2151 return raw_arg_begin() + numTrailingObjects(OverloadToken<Stmt *>());
2177 Stmt *Argument =
nullptr;
2181 bool ArrayFormAsWritten,
bool UsualArrayDeleteWantsSize,
2186 OperatorDelete(OperatorDelete), Argument(Arg) {
2238 llvm::PointerUnion<TypeSourceInfo *, IdentifierInfo *>
Type;
2247 : Type(II), Location(Loc) {}
2327 :
Expr(CXXPseudoDestructorExprClass, Shell), IsArrow(
false) {}
2415 return T->
getStmtClass() == CXXPseudoDestructorExprClass;
2449 size_t numTrailingObjects(OverloadToken<TypeSourceInfo *>)
const {
2483 assert(I <
getNumArgs() &&
"Argument out-of-range");
2489 return llvm::makeArrayRef(getTrailingObjects<TypeSourceInfo *>(),
2541 (queried->
getType()->isInstantiationDependentType() ||
2544 ATT(att), Value(value), Dimension(dimension),
2545 Loc(loc), RParen(rparen), QueriedType(queried) {}
2548 :
Expr(ArrayTypeTraitExprClass, Empty), ATT(0) {}
2594 Expr* QueriedExpression =
nullptr;
2600 Expr *queried,
bool value,
2608 ET(et),
Value(value), Loc(loc), RParen(rparen),
2609 QueriedExpression(queried) {}
2652 bool KnownDependent,
bool KnownInstantiationDependent,
2653 bool KnownContainsUnexpandedParameterPack);
2656 bool HasTemplateKWAndArgsInfo);
2661 return const_cast<OverloadExpr *
>(
this)->getTrailingResults();
2669 ->getTrailingASTTemplateKWAndArgsInfo();
2676 return const_cast<OverloadExpr *
>(
this)->getTrailingTemplateArgumentLoc();
2701 if (isa<UnaryOperator>(E)) {
2702 assert(cast<UnaryOperator>(E)->
getOpcode() == UO_AddrOf);
2703 E = cast<UnaryOperator>(E)->getSubExpr();
2706 Result.HasFormOfMemberPointer = (E == Ovl && Ovl->getQualifier());
2707 Result.IsAddressOfOperand =
true;
2708 Result.Expression = Ovl;
2710 Result.HasFormOfMemberPointer =
false;
2711 Result.IsAddressOfOperand =
false;
2712 Result.Expression = cast<OverloadExpr>(E);
2722 return const_cast<OverloadExpr *
>(
this)->getNamingClass();
2733 llvm::iterator_range<decls_iterator>
decls()
const {
2734 return llvm::make_range(decls_begin(), decls_end());
2761 if (!hasTemplateKWAndArgsInfo())
2763 return getTrailingASTTemplateKWAndArgsInfo()->
TemplateKWLoc;
2769 if (!hasTemplateKWAndArgsInfo())
2771 return getTrailingASTTemplateKWAndArgsInfo()->
LAngleLoc;
2777 if (!hasTemplateKWAndArgsInfo())
2779 return getTrailingASTTemplateKWAndArgsInfo()->
RAngleLoc;
2789 if (!hasExplicitTemplateArgs())
2791 return const_cast<OverloadExpr *
>(
this)->getTrailingTemplateArgumentLoc();
2795 if (!hasExplicitTemplateArgs())
2802 return {getTemplateArgs(), getNumTemplateArgs()};
2807 if (hasExplicitTemplateArgs())
2808 getTrailingASTTemplateKWAndArgsInfo()->
copyInto(getTemplateArgs(), List);
2812 return T->
getStmtClass() == UnresolvedLookupExprClass ||
2831 ASTTemplateKWAndArgsInfo,
2832 TemplateArgumentLoc> {
2865 bool HasTemplateKWAndArgsInfo);
2867 unsigned numTrailingObjects(OverloadToken<DeclAccessPair>)
const {
2868 return getNumDecls();
2871 unsigned numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
2872 return hasTemplateKWAndArgsInfo();
2890 unsigned NumResults,
2891 bool HasTemplateKWAndArgsInfo,
2892 unsigned NumTemplateArgs);
2909 return l.getBeginLoc();
2910 return getNameInfo().getBeginLoc();
2914 if (hasExplicitTemplateArgs())
2915 return getRAngleLoc();
2916 return getNameInfo().getEndLoc();
2945 ASTTemplateKWAndArgsInfo,
2946 TemplateArgumentLoc> {
2963 size_t numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
2964 return hasTemplateKWAndArgsInfo();
2967 bool hasTemplateKWAndArgsInfo()
const {
2978 bool HasTemplateKWAndArgsInfo,
2979 unsigned NumTemplateArgs);
3005 if (!hasTemplateKWAndArgsInfo())
3007 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->TemplateKWLoc;
3013 if (!hasTemplateKWAndArgsInfo())
3015 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->LAngleLoc;
3021 if (!hasTemplateKWAndArgsInfo())
3023 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->RAngleLoc;
3035 if (hasExplicitTemplateArgs())
3036 getTrailingObjects<ASTTemplateKWAndArgsInfo>()->copyInto(
3037 getTrailingObjects<TemplateArgumentLoc>(), List);
3041 if (!hasExplicitTemplateArgs())
3044 return getTrailingObjects<TemplateArgumentLoc>();
3048 if (!hasExplicitTemplateArgs())
3051 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->NumTemplateArgs;
3055 return {getTemplateArgs(), getNumTemplateArgs()};
3065 if (hasExplicitTemplateArgs())
3066 return getRAngleLoc();
3067 return getLocation();
3071 return T->
getStmtClass() == DependentScopeDeclRefExprClass;
3109 unsigned numObjects);
3112 bool CleanupsHaveSideEffects,
3116 return llvm::makeArrayRef(getTrailingObjects<CleanupObject>(),
3123 assert(i < getNumObjects() &&
"Index out of range");
3124 return getObjects()[i];
3132 return SubExpr->getBeginLoc();
3136 return SubExpr->getEndLoc();
3188 :
Expr(CXXUnresolvedConstructExprClass, Empty) {
3245 assert(I < arg_size() &&
"Argument index out-of-range");
3250 assert(I < arg_size() &&
"Argument index out-of-range");
3255 assert(I < arg_size() &&
"Argument index out-of-range");
3261 if (!RParenLoc.
isValid() && arg_size() > 0)
3267 return T->
getStmtClass() == CXXUnresolvedConstructExprClass;
3287 ASTTemplateKWAndArgsInfo,
3288 TemplateArgumentLoc, NamedDecl *> {
3327 bool hasTemplateKWAndArgsInfo()
const {
3331 bool hasFirstQualifierFoundInScope()
const {
3335 unsigned numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
3336 return hasTemplateKWAndArgsInfo();
3339 unsigned numTrailingObjects(OverloadToken<TemplateArgumentLoc>)
const {
3340 return getNumTemplateArgs();
3343 unsigned numTrailingObjects(OverloadToken<NamedDecl *>)
const {
3344 return hasFirstQualifierFoundInScope();
3357 bool HasFirstQualifierFoundInScope);
3369 unsigned NumTemplateArgs,
bool HasFirstQualifierFoundInScope);
3383 assert(!isImplicitAccess());
3384 return cast<Expr>(Base);
3419 if (!hasFirstQualifierFoundInScope())
3421 return *getTrailingObjects<NamedDecl *>();
3426 return MemberNameInfo;
3439 if (!hasTemplateKWAndArgsInfo())
3441 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->TemplateKWLoc;
3447 if (!hasTemplateKWAndArgsInfo())
3449 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->LAngleLoc;
3455 if (!hasTemplateKWAndArgsInfo())
3457 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->RAngleLoc;
3470 if (hasExplicitTemplateArgs())
3471 getTrailingObjects<ASTTemplateKWAndArgsInfo>()->copyInto(
3472 getTrailingObjects<TemplateArgumentLoc>(), List);
3478 if (!hasExplicitTemplateArgs())
3481 return getTrailingObjects<TemplateArgumentLoc>();
3487 if (!hasExplicitTemplateArgs())
3490 return getTrailingObjects<ASTTemplateKWAndArgsInfo>()->NumTemplateArgs;
3494 return {getTemplateArgs(), getNumTemplateArgs()};
3498 if (!isImplicitAccess())
3501 return getQualifierLoc().getBeginLoc();
3506 if (hasExplicitTemplateArgs())
3507 return getRAngleLoc();
3512 return T->
getStmtClass() == CXXDependentScopeMemberExprClass;
3517 if (isImplicitAccess())
3541 ASTTemplateKWAndArgsInfo,
3542 TemplateArgumentLoc> {
3583 bool HasTemplateKWAndArgsInfo);
3585 unsigned numTrailingObjects(OverloadToken<DeclAccessPair>)
const {
3586 return getNumDecls();
3589 unsigned numTrailingObjects(OverloadToken<ASTTemplateKWAndArgsInfo>)
const {
3590 return hasTemplateKWAndArgsInfo();
3603 unsigned NumResults,
3604 bool HasTemplateKWAndArgsInfo,
3605 unsigned NumTemplateArgs);
3611 bool isImplicitAccess()
const;
3616 assert(!isImplicitAccess());
3617 return cast<Expr>(Base);
3620 assert(!isImplicitAccess());
3621 return cast<Expr>(Base);
3661 if (!isImplicitAccess())
3664 return l.getBeginLoc();
3665 return getMemberNameInfo().getBeginLoc();
3669 if (hasExplicitTemplateArgs())
3670 return getRAngleLoc();
3671 return getMemberNameInfo().getEndLoc();
3680 if (isImplicitAccess())
3687 if (
auto *ULE = dyn_cast<UnresolvedLookupExpr>(
this))
3689 return cast<UnresolvedMemberExpr>(
this)->getTrailingObjects<DeclAccessPair>();
3693 if (!hasTemplateKWAndArgsInfo())
3696 if (
auto *ULE = dyn_cast<UnresolvedLookupExpr>(
this))
3698 return cast<UnresolvedMemberExpr>(
this)
3699 ->getTrailingObjects<ASTTemplateKWAndArgsInfo>();
3703 if (
auto *ULE = dyn_cast<UnresolvedLookupExpr>(
this))
3705 return cast<UnresolvedMemberExpr>(
this)
3706 ->getTrailingObjects<TemplateArgumentLoc>();
3710 if (
auto *ULE = dyn_cast<UnresolvedLookupExpr>(
this))
3711 return ULE->getNamingClass();
3712 return cast<UnresolvedMemberExpr>(
this)->getNamingClass();
3733 Operand(Operand), Range(Keyword, RParen) {
3783 unsigned NumExpansions;
3794 EllipsisLoc(EllipsisLoc),
3795 NumExpansions(NumExpansions ? *NumExpansions + 1 : 0),
3814 return NumExpansions - 1;
3884 OperatorLoc(OperatorLoc), PackLoc(PackLoc), RParenLoc(RParenLoc),
3885 Length(Length ? *Length : PartialArgs.size()), Pack(Pack) {
3886 assert((!Length || PartialArgs.empty()) &&
3887 "have partial args for non-dependent sizeof... expression");
3888 auto *Args = getTrailingObjects<TemplateArgument>();
3889 std::uninitialized_copy(PartialArgs.begin(), PartialArgs.end(), Args);
3894 :
Expr(SizeOfPackExprClass, Empty), Length(NumPartialArgs) {}
3903 unsigned NumPartialArgs);
3923 "Cannot get the length of a value-dependent pack size expression");
3938 assert(isPartiallySubstituted());
3939 const auto *Args = getTrailingObjects<TemplateArgument>();
3940 return llvm::makeArrayRef(Args, Args + Length);
3969 :
Expr(SubstNonTypeTemplateParmExprClass, Empty) {}
3980 Param(Param), Replacement(Replacement) {
3995 return s->
getStmtClass() == SubstNonTypeTemplateParmExprClass;
4026 unsigned NumArguments;
4032 :
Expr(SubstNonTypeTemplateParmPackExprClass, Empty) {}
4055 return T->
getStmtClass() == SubstNonTypeTemplateParmPackExprClass;
4092 unsigned NumParameters;
4104 unsigned NumParams);
4170 unsigned ManglingNumber;
4172 llvm::PointerUnion<Stmt *, ExtraState *>
State;
4174 void initializeExtraState(
const ValueDecl *ExtendedBy,
4175 unsigned ManglingNumber);
4179 bool BoundToLvalueReference)
4180 :
Expr(MaterializeTemporaryExprClass, T,
4188 :
Expr(MaterializeTemporaryExprClass, Empty) {}
4191 return State.is<
Stmt *>() ? State.get<
Stmt *>()
4192 : State.get<ExtraState *>()->Temporary;
4201 const ValueDecl *ExtendingDecl = getExtendingDecl();
4206 if (isa<FieldDecl>(ExtendingDecl))
4210 if (isa<BindingDecl>(ExtendingDecl))
4214 return cast<VarDecl>(ExtendingDecl)->getStorageDuration();
4220 return State.is<
Stmt *>() ?
nullptr 4221 : State.get<ExtraState *>()->ExtendingDecl;
4224 void setExtendingDecl(
const ValueDecl *ExtendedBy,
unsigned ManglingNumber);
4227 return State.is<
Stmt *>() ? 0 : State.get<ExtraState *>()->ManglingNumber;
4237 return getTemporary()->getBeginLoc();
4241 return getTemporary()->getEndLoc();
4245 return T->
getStmtClass() == MaterializeTemporaryExprClass;
4250 if (State.is<
Stmt *>())
4251 return child_range(State.getAddrOfPtr1(), State.getAddrOfPtr1() + 1);
4253 auto ES = State.get<ExtraState *>();
4254 return child_range(&ES->Temporary, &ES->Temporary + 1);
4283 LParenLoc(LParenLoc), EllipsisLoc(EllipsisLoc), RParenLoc(RParenLoc),
4296 return getLHS() && getLHS()->containsUnexpandedParameterPack();
4341 enum SubExpr { Common, Ready, Suspend, Resume, Count };
4343 Stmt *SubExprs[SubExpr::Count];
4354 KeywordLoc(KeywordLoc), OpaqueValue(OpaqueValue) {
4355 SubExprs[SubExpr::Common] = Common;
4356 SubExprs[SubExpr::Ready] = Ready;
4357 SubExprs[SubExpr::Suspend] = Suspend;
4358 SubExprs[SubExpr::Resume] = Resume;
4365 KeywordLoc(KeywordLoc) {
4367 "wrong constructor for non-dependent co_await/co_yield expression");
4368 SubExprs[SubExpr::Common] = Common;
4369 SubExprs[SubExpr::Ready] =
nullptr;
4370 SubExprs[SubExpr::Suspend] =
nullptr;
4371 SubExprs[SubExpr::Resume] =
nullptr;
4375 SubExprs[SubExpr::Common] =
nullptr;
4376 SubExprs[SubExpr::Ready] =
nullptr;
4377 SubExprs[SubExpr::Suspend] =
nullptr;
4378 SubExprs[SubExpr::Resume] =
nullptr;
4384 return static_cast<Expr*
>(SubExprs[SubExpr::Common]);
4391 return static_cast<Expr*
>(SubExprs[SubExpr::Ready]);
4395 return static_cast<Expr*
>(SubExprs[SubExpr::Suspend]);
4399 return static_cast<Expr*
>(SubExprs[SubExpr::Resume]);
4405 return getCommonExpr()->getEndLoc();
4409 return child_range(SubExprs, SubExprs + SubExpr::Count);
4425 bool IsImplicit =
false)
4427 Suspend, Resume, OpaqueValue) {
4432 bool IsImplicit =
false)
4442 return getCommonExpr();
4468 KeywordLoc(KeywordLoc) {
4472 "wrong constructor for non-dependent co_await/co_yield expression");
4474 SubExprs[1] = OpCoawait;
4478 :
Expr(DependentCoawaitExprClass, Empty) {}
4483 return cast<UnresolvedLookupExpr>(SubExprs[1]);
4491 return getOperand()->getEndLoc();
4509 Suspend, Resume, OpaqueValue) {}
4517 return getCommonExpr();
4527 #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.
static CXXDefaultInitExpr * Create(const ASTContext &Ctx, SourceLocation Loc, FieldDecl *Field)
Field is the non-static data member whose default initializer is used by this expression.
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.
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
SourceRange getSourceRange() const
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)
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
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
SourceLocation getEndLoc() 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...
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.
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)
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)
SourceLocation getBeginLoc() const LLVM_READONLY
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
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.
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.
std::string getName(ArrayRef< StringRef > Parts) const
Get the platform-specific name separator.
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)
static constexpr ADLCallKind UsesADL
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)
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.
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
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.
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)
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...
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)
const Expr * getArraySize() const
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
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.
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()
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
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
bool isRightFold() const
Does this produce a right-associated sequence of operators?
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
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
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.
static CXXDefaultArgExpr * Create(const ASTContext &C, SourceLocation Loc, ParmVarDecl *Param)
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getEndLoc() const
bool isImplicitAccess() const
True if this is an implicit access, i.e.
SubstNonTypeTemplateParmExprBitfields SubstNonTypeTemplateParmExprBits
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.
SourceRange getSourceRange() const LLVM_READONLY
Retrieve the source range of the expression.
Pepresents 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
llvm::iterator_range< const_arg_iterator > const_arg_range
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
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)
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...
SourceLocation getBeginLoc() const
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)
DependentCoawaitExpr(SourceLocation KeywordLoc, QualType Ty, Expr *Op, UnresolvedLookupExpr *OpCoawait)
SourceLocation getEndLoc() const LLVM_READONLY
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.
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
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.
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.
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
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)
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
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.
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.
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
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...
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 that has been substituted but not yet expanded...
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
CXXNullPtrLiteralExprBitfields CXXNullPtrLiteralExprBits
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
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)
SourceLocation getBeginLoc() const LLVM_READONLY
CXXFoldExpr(EmptyShell Empty)
Reads an AST files chain containing the contents of a translation unit.
BinaryOperator::Opcode getOpcode(const SymExpr *SE)
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.
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)
void setInstantiationDependent(bool ID)
Set whether this expression is instantiation-dependent or not.
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)
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.
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.
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.
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...
void setExprOperand(Expr *E)
void setPreArg(unsigned I, Stmt *PreArg)
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
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)
SourceRange getTypeIdParens() const
Expr * getPattern()
Retrieve the pattern of the pack expansion.
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.
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
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)
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.
const DeclarationNameInfo & getMemberNameInfo() const
Retrieve the name of the member that this expression refers to.
SourceLocation getEndLoc() const LLVM_READONLY
Expr * IgnoreParens() LLVM_READONLY
IgnoreParens - Ignore parentheses.
ConstructionKind getConstructionKind() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
CXXDependentScopeMemberExprBitfields CXXDependentScopeMemberExprBits
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.