14 #ifndef LLVM_CLANG_LIB_SEMA_TREETRANSFORM_H 15 #define LLVM_CLANG_LIB_SEMA_TREETRANSFORM_H 37 #include "llvm/ADT/ArrayRef.h" 38 #include "llvm/Support/ErrorHandling.h" 95 template<
typename Derived>
100 class ForgetPartiallySubstitutedPackRAII {
105 ForgetPartiallySubstitutedPackRAII(Derived &Self) : Self(Self) {
106 Old = Self.ForgetPartiallySubstitutedPack();
109 ~ForgetPartiallySubstitutedPackRAII() {
110 Self.RememberPartiallySubstitutedPack(Old);
127 Derived &
getDerived() {
return static_cast<Derived&
>(*this); }
131 return static_cast<const Derived&
>(*this);
184 OldLocation = Self.
getDerived().getBaseLocation();
185 OldEntity = Self.
getDerived().getBaseEntity();
192 Self.
getDerived().setBase(OldLocation, OldEntity);
258 bool &RetainExpansion,
260 ShouldExpand =
false;
351 const Attr *TransformAttr(
const Attr *S);
360 #define PRAGMA_SPELLING_ATTR(X) \ 361 const X##Attr *Transform##X##Attr(const X##Attr *R) { return R; } 362 #include "clang/Basic/AttrList.inc" 381 ExprResult TransformInitializer(Expr *Init,
bool NotCopyInit);
406 bool TransformExprs(Expr *
const *Inputs,
unsigned NumInputs,
bool IsCall,
407 SmallVectorImpl<Expr *> &Outputs,
408 bool *ArgChanged =
nullptr);
417 llvm::DenseMap<Decl *, Decl *>::iterator Known
418 = TransformedLocalDecls.find(D);
419 if (Known != TransformedLocalDecls.end())
420 return Known->second;
448 TransformedLocalDecls[Old] = New;
456 return getDerived().TransformDecl(Loc, D);
469 return cast_or_null<NamedDecl>(getDerived().TransformDecl(Loc, D));
473 bool TransformOverloadExprDecls(
OverloadExpr *Old,
bool RequiresADL,
485 NamedDecl *FirstQualifierInScope =
nullptr);
520 NamedDecl *FirstQualifierInScope =
nullptr,
521 bool AllowInjectedClassName =
false);
533 bool Uneval =
false);
556 bool Uneval =
false) {
557 return TransformTemplateArguments(Inputs, Inputs + NumInputs, Outputs,
575 template<
typename InputIterator>
576 bool TransformTemplateArguments(InputIterator
First,
579 bool Uneval =
false);
588 getDerived().getBaseLocation());
591 #define ABSTRACT_TYPELOC(CLASS, PARENT) 592 #define TYPELOC(CLASS, PARENT) \ 593 QualType Transform##CLASS##Type(TypeLocBuilder &TLB, CLASS##TypeLoc T); 594 #include "clang/AST/TypeLocNodes.def" 596 template<
typename Fn>
597 QualType TransformFunctionProtoType(TypeLocBuilder &TLB,
598 FunctionProtoTypeLoc TL,
599 CXXRecordDecl *ThisContext,
600 Qualifiers ThisTypeQuals,
601 Fn TransformExceptionSpec);
603 bool TransformExceptionSpec(SourceLocation Loc,
604 FunctionProtoType::ExceptionSpecInfo &ESI,
605 SmallVectorImpl<QualType> &Exceptions,
608 StmtResult TransformSEHHandler(Stmt *Handler);
611 TransformTemplateSpecializationType(TypeLocBuilder &TLB,
612 TemplateSpecializationTypeLoc TL,
613 TemplateName Template);
616 TransformDependentTemplateSpecializationType(TypeLocBuilder &TLB,
617 DependentTemplateSpecializationTypeLoc TL,
618 TemplateName Template,
621 QualType TransformDependentTemplateSpecializationType(
622 TypeLocBuilder &TLB, DependentTemplateSpecializationTypeLoc TL,
623 NestedNameSpecifierLoc QualifierLoc);
632 bool TransformFunctionTypeParams(
633 SourceLocation Loc, ArrayRef<ParmVarDecl *> Params,
634 const QualType *ParamTypes,
635 const FunctionProtoType::ExtParameterInfo *ParamInfos,
636 SmallVectorImpl<QualType> &PTypes, SmallVectorImpl<ParmVarDecl *> *PVars,
637 Sema::ExtParameterInfoBuilder &PInfos);
644 ParmVarDecl *TransformFunctionTypeParam(ParmVarDecl *OldParm,
646 Optional<unsigned> NumExpansions,
647 bool ExpectParameterPack);
649 QualType TransformReferenceType(TypeLocBuilder &TLB, ReferenceTypeLoc TL);
651 StmtResult TransformCompoundStmt(CompoundStmt *S,
bool IsStmtExpr);
652 ExprResult TransformCXXNamedCastExpr(CXXNamedCastExpr *E);
662 bool IsAddressOfOperand,
665 ExprResult TransformParenDependentScopeDeclRefExpr(
673 #define STMT(Node, Parent) \ 674 LLVM_ATTRIBUTE_NOINLINE \ 675 StmtResult Transform##Node(Node *S); 676 #define EXPR(Node, Parent) \ 677 LLVM_ATTRIBUTE_NOINLINE \ 678 ExprResult Transform##Node(Node *E); 679 #define ABSTRACT_STMT(Stmt) 680 #include "clang/AST/StmtNodes.inc" 682 #define OPENMP_CLAUSE(Name, Class) \ 683 LLVM_ATTRIBUTE_NOINLINE \ 684 OMPClause *Transform ## Class(Class *S); 685 #include "clang/Basic/OpenMPKinds.def" 693 QualType RebuildQualifiedType(QualType T, QualifiedTypeLoc TL);
699 QualType RebuildPointerType(QualType PointeeType, SourceLocation Sigil);
705 QualType RebuildBlockPointerType(QualType PointeeType, SourceLocation Sigil);
715 QualType RebuildReferenceType(QualType ReferentType,
717 SourceLocation Sigil);
724 QualType RebuildMemberPointerType(QualType PointeeType, QualType ClassType,
725 SourceLocation Sigil);
727 QualType RebuildObjCTypeParamType(
const ObjCTypeParamDecl *Decl,
728 SourceLocation ProtocolLAngleLoc,
729 ArrayRef<ObjCProtocolDecl *> Protocols,
730 ArrayRef<SourceLocation> ProtocolLocs,
731 SourceLocation ProtocolRAngleLoc);
737 QualType RebuildObjCObjectType(QualType BaseType,
739 SourceLocation TypeArgsLAngleLoc,
740 ArrayRef<TypeSourceInfo *> TypeArgs,
741 SourceLocation TypeArgsRAngleLoc,
742 SourceLocation ProtocolLAngleLoc,
743 ArrayRef<ObjCProtocolDecl *> Protocols,
744 ArrayRef<SourceLocation> ProtocolLocs,
745 SourceLocation ProtocolRAngleLoc);
751 QualType RebuildObjCObjectPointerType(QualType PointeeType,
752 SourceLocation Star);
761 QualType RebuildArrayType(QualType ElementType,
763 const llvm::APInt *Size,
765 unsigned IndexTypeQuals,
766 SourceRange BracketsRange);
773 QualType RebuildConstantArrayType(QualType ElementType,
775 const llvm::APInt &Size,
776 unsigned IndexTypeQuals,
777 SourceRange BracketsRange);
784 QualType RebuildIncompleteArrayType(QualType ElementType,
786 unsigned IndexTypeQuals,
787 SourceRange BracketsRange);
794 QualType RebuildVariableArrayType(QualType ElementType,
797 unsigned IndexTypeQuals,
798 SourceRange BracketsRange);
805 QualType RebuildDependentSizedArrayType(QualType ElementType,
808 unsigned IndexTypeQuals,
809 SourceRange BracketsRange);
816 QualType RebuildVectorType(QualType ElementType,
unsigned NumElements,
824 QualType RebuildDependentVectorType(QualType ElementType, Expr *SizeExpr,
825 SourceLocation AttributeLoc,
833 QualType RebuildExtVectorType(QualType ElementType,
unsigned NumElements,
834 SourceLocation AttributeLoc);
841 QualType RebuildDependentSizedExtVectorType(QualType ElementType,
843 SourceLocation AttributeLoc);
853 QualType RebuildDependentAddressSpaceType(QualType PointeeType,
855 SourceLocation AttributeLoc);
861 QualType RebuildFunctionProtoType(QualType T,
862 MutableArrayRef<QualType> ParamTypes,
863 const FunctionProtoType::ExtProtoInfo &EPI);
866 QualType RebuildFunctionNoProtoType(QualType ResultType);
870 QualType RebuildUnresolvedUsingType(SourceLocation NameLoc, Decl *D);
925 Template, Deduced,
false);
971 bool AllowInjectedClassName) {
975 SS.
Adopt(QualifierLoc);
976 TemplateName InstName = getDerived().RebuildTemplateName(
977 SS, TemplateKWLoc, *Name, NameLoc,
QualType(),
nullptr,
978 AllowInjectedClassName);
993 getDerived().RebuildTemplateSpecializationType(InstName, NameLoc, Args);
1014 bool DeducedTSTContext) {
1016 SS.
Adopt(QualifierLoc);
1031 if (!DeducedTSTContext) {
1032 if (
auto *Deduced = dyn_cast_or_null<DeducedTemplateSpecializationType>(
1034 SemaRef.
Diag(IdLoc, diag::err_dependent_deduced_tst)
1036 Deduced->getTemplateName())
1038 if (
auto *TD = Deduced->getTemplateName().getAsTemplateDecl())
1039 SemaRef.
Diag(TD->getLocation(), diag::note_template_decl_here);
1072 llvm_unreachable(
"Tag lookup cannot find non-tags");
1090 SemaRef.
Diag(IdLoc, diag::err_tag_reference_non_tag) << SomeDecl
1096 SemaRef.
Diag(IdLoc, diag::err_not_tag_in_scope)
1105 SemaRef.
Diag(KeywordLoc, diag::err_use_with_wrong_tag) <<
Id;
1125 return getSema().CheckPackExpansion(Pattern, PatternRange, EllipsisLoc,
1161 bool AllowInjectedClassName);
1174 bool AllowInjectedClassName);
1185 return getSema().Context.getSubstTemplateTemplateParmPack(Param, ArgPack);
1196 return getSema().ActOnCompoundStmt(LBraceLoc, RBraceLoc, Statements,
1209 return getSema().ActOnCaseStmt(CaseLoc, LHS, EllipsisLoc, RHS,
1218 getSema().ActOnCaseStmtBody(S, Body);
1229 return getSema().ActOnDefaultStmt(DefaultLoc, ColonLoc, SubStmt,
1259 return getSema().ActOnIfStmt(IfLoc, IsConstexpr, Init, Cond, Then,
1269 return getSema().ActOnStartOfSwitchStmt(SwitchLoc, Init, Cond);
1278 return getSema().ActOnFinishSwitchStmt(SwitchLoc, Switch, Body);
1287 return getSema().ActOnWhileStmt(WhileLoc, Cond, Body);
1297 return getSema().ActOnDoStmt(DoLoc, Body, WhileLoc, LParenLoc,
1309 return getSema().ActOnForStmt(ForLoc, LParenLoc, Init, Cond,
1310 Inc, RParenLoc, Body);
1319 return getSema().ActOnGotoStmt(GotoLoc, LabelLoc, Label);
1329 return getSema().ActOnIndirectGotoStmt(GotoLoc, StarLoc, Target);
1337 return getSema().BuildReturnStmt(ReturnLoc, Result);
1347 return getSema().ActOnDeclStmt(DG, StartLoc, EndLoc);
1355 bool IsVolatile,
unsigned NumOutputs,
1360 return getSema().ActOnGCCAsmStmt(AsmLoc, IsSimple, IsVolatile, NumOutputs,
1361 NumInputs, Names, Constraints, Exprs,
1362 AsmString, Clobbers, RParenLoc);
1371 StringRef AsmString,
1372 unsigned NumOutputs,
unsigned NumInputs,
1377 return getSema().ActOnMSAsmStmt(AsmLoc, LBraceLoc, AsmToks, AsmString,
1378 NumOutputs, NumInputs,
1379 Constraints, Clobbers, Exprs, EndLoc);
1388 return getSema().BuildCoreturnStmt(CoreturnLoc, Result, IsImplicit);
1397 return getSema().BuildResolvedCoawaitExpr(CoawaitLoc, Result, IsImplicit);
1407 return getSema().BuildUnresolvedCoawaitExpr(CoawaitLoc, Result, Lookup);
1415 return getSema().BuildCoyieldExpr(CoyieldLoc, Result);
1419 return getSema().BuildCoroutineBodyStmt(Args);
1430 return getSema().ActOnObjCAtTryStmt(AtLoc, TryBody, CatchStmts,
1440 return getSema().BuildObjCExceptionDecl(TInfo, T,
1454 return getSema().ActOnObjCAtCatchStmt(AtLoc, RParenLoc,
1464 return getSema().ActOnObjCAtFinallyStmt(AtLoc, Body);
1473 return getSema().BuildObjCAtThrowStmt(AtLoc, Operand);
1486 return getSema().ActOnOpenMPExecutableDirective(
1487 Kind, DirName, CancelRegion, Clauses, AStmt, StartLoc, EndLoc);
1500 return getSema().ActOnOpenMPIfClause(NameModifier, Condition, StartLoc,
1501 LParenLoc, NameModifierLoc, ColonLoc,
1512 return getSema().ActOnOpenMPFinalClause(Condition, StartLoc, LParenLoc,
1524 return getSema().ActOnOpenMPNumThreadsClause(NumThreads, StartLoc,
1535 return getSema().ActOnOpenMPSafelenClause(Len, StartLoc, LParenLoc, EndLoc);
1545 return getSema().ActOnOpenMPSimdlenClause(Len, StartLoc, LParenLoc, EndLoc);
1555 return getSema().ActOnOpenMPCollapseClause(Num, StartLoc, LParenLoc,
1568 return getSema().ActOnOpenMPDefaultClause(Kind, KindKwLoc,
1569 StartLoc, LParenLoc, EndLoc);
1581 return getSema().ActOnOpenMPProcBindClause(Kind, KindKwLoc,
1582 StartLoc, LParenLoc, EndLoc);
1594 return getSema().ActOnOpenMPScheduleClause(
1595 M1, M2, Kind, ChunkSize, StartLoc, LParenLoc, M1Loc, M2Loc, KindLoc,
1606 return getSema().ActOnOpenMPOrderedClause(StartLoc, EndLoc, LParenLoc, Num);
1617 return getSema().ActOnOpenMPPrivateClause(VarList, StartLoc, LParenLoc,
1629 return getSema().ActOnOpenMPFirstprivateClause(VarList, StartLoc, LParenLoc,
1641 return getSema().ActOnOpenMPLastprivateClause(VarList, StartLoc, LParenLoc,
1653 return getSema().ActOnOpenMPSharedClause(VarList, StartLoc, LParenLoc,
1669 return getSema().ActOnOpenMPReductionClause(
1670 VarList, StartLoc, LParenLoc, ColonLoc, EndLoc, ReductionIdScopeSpec,
1671 ReductionId, UnresolvedReductions);
1684 return getSema().ActOnOpenMPTaskReductionClause(
1685 VarList, StartLoc, LParenLoc, ColonLoc, EndLoc, ReductionIdScopeSpec,
1686 ReductionId, UnresolvedReductions);
1700 return getSema().ActOnOpenMPInReductionClause(
1701 VarList, StartLoc, LParenLoc, ColonLoc, EndLoc, ReductionIdScopeSpec,
1702 ReductionId, UnresolvedReductions);
1716 return getSema().ActOnOpenMPLinearClause(VarList, Step, StartLoc, LParenLoc,
1717 Modifier, ModifierLoc, ColonLoc,
1730 return getSema().ActOnOpenMPAlignedClause(VarList, Alignment, StartLoc,
1731 LParenLoc, ColonLoc, EndLoc);
1742 return getSema().ActOnOpenMPCopyinClause(VarList, StartLoc, LParenLoc,
1754 return getSema().ActOnOpenMPCopyprivateClause(VarList, StartLoc, LParenLoc,
1766 return getSema().ActOnOpenMPFlushClause(VarList, StartLoc, LParenLoc,
1779 return getSema().ActOnOpenMPDependClause(DepKind, DepLoc, ColonLoc, VarList,
1780 StartLoc, LParenLoc, EndLoc);
1790 return getSema().ActOnOpenMPDeviceClause(Device, StartLoc, LParenLoc,
1805 return getSema().ActOnOpenMPMapClause(MapTypeModifiers, MapTypeModifiersLoc,
1806 MapType, IsMapTypeImplicit, MapLoc,
1807 ColonLoc, VarList, StartLoc,
1818 return getSema().ActOnOpenMPNumTeamsClause(NumTeams, StartLoc, LParenLoc,
1830 return getSema().ActOnOpenMPThreadLimitClause(ThreadLimit, StartLoc,
1841 return getSema().ActOnOpenMPPriorityClause(Priority, StartLoc, LParenLoc,
1852 return getSema().ActOnOpenMPGrainsizeClause(Grainsize, StartLoc, LParenLoc,
1863 return getSema().ActOnOpenMPNumTasksClause(NumTasks, StartLoc, LParenLoc,
1874 return getSema().ActOnOpenMPHintClause(Hint, StartLoc, LParenLoc, EndLoc);
1886 return getSema().ActOnOpenMPDistScheduleClause(
1887 Kind, ChunkSize, StartLoc, LParenLoc, KindLoc, CommaLoc, EndLoc);
1898 return getSema().ActOnOpenMPToClause(VarList, StartLoc, LParenLoc, EndLoc);
1909 return getSema().ActOnOpenMPFromClause(VarList, StartLoc, LParenLoc,
1921 return getSema().ActOnOpenMPUseDevicePtrClause(VarList, StartLoc, LParenLoc,
1933 return getSema().ActOnOpenMPIsDevicePtrClause(VarList, StartLoc, LParenLoc,
1943 return getSema().ActOnObjCAtSynchronizedOperand(atLoc,
object);
1952 return getSema().ActOnObjCAtSynchronizedStmt(AtLoc, Object, Body);
1961 return getSema().ActOnObjCAutoreleasePoolStmt(AtLoc, Body);
1973 StmtResult ForEachStmt = getSema().ActOnObjCForCollectionStmt(ForLoc,
1980 return getSema().FinishObjCForCollectionStmt(ForEachStmt.
get(), Body);
1992 VarDecl *Var = getSema().BuildExceptionDeclaration(
nullptr, Declarator,
1993 StartLoc, IdLoc, Id);
1995 getSema().CurContext->addDecl(Var);
2006 return Owned(
new (getSema().Context)
CXXCatchStmt(CatchLoc, ExceptionDecl,
2016 return getSema().ActOnCXXTryBlock(TryLoc, TryBlock, Handlers);
2031 if (
DeclStmt *RangeStmt = dyn_cast<DeclStmt>(Range)) {
2032 if (RangeStmt->isSingleDecl()) {
2033 if (
VarDecl *RangeVar = dyn_cast<VarDecl>(RangeStmt->getSingleDecl())) {
2034 if (RangeVar->isInvalidDecl())
2037 Expr *RangeExpr = RangeVar->getInit();
2044 diag::err_objc_for_range_init_stmt)
2047 return getSema().ActOnObjCForCollectionStmt(ForLoc, LoopVar,
2048 RangeExpr, RParenLoc);
2054 return getSema().BuildCXXForRangeStmt(ForLoc, CoawaitLoc, Init, ColonLoc,
2055 Range, Begin, End, Cond, Inc, LoopVar,
2068 return getSema().BuildMSDependentExistsStmt(KeywordLoc, IsIfExists,
2069 QualifierLoc, NameInfo, Nested);
2077 return getSema().FinishCXXForRangeStmt(ForRange, Body);
2082 return getSema().ActOnSEHTryBlock(IsCXXTry, TryLoc, TryBlock, Handler);
2087 return getSema().ActOnSEHExceptBlock(Loc, FilterExpr, Block);
2100 return getSema().BuildPredefinedExpr(Loc, IK);
2110 return getSema().BuildDeclarationNameExpr(SS, R, RequiresADL);
2123 SS.
Adopt(QualifierLoc);
2127 return getSema().BuildDeclarationNameExpr(SS, NameInfo, VD);
2136 return getSema().ActOnParenExpr(LParen, RParen, SubExpr);
2159 return getSema().BuildUnaryOp(
nullptr, OpLoc, Opc, SubExpr);
2170 return getSema().BuildBuiltinOffsetOf(OperatorLoc, Type, Components,
2183 return getSema().CreateUnaryExprOrTypeTraitExpr(TInfo, OpLoc, ExprKind, R);
2195 = getSema().CreateUnaryExprOrTypeTraitExpr(SubExpr, OpLoc, ExprKind);
2210 return getSema().ActOnArraySubscriptExpr(
nullptr, LHS,
2223 return getSema().ActOnOMPArraySectionExpr(Base, LBracketLoc, LowerBound,
2224 ColonLoc, Length, RBracketLoc);
2234 Expr *ExecConfig =
nullptr) {
2235 return getSema().ActOnCallExpr(
nullptr, Callee, LParenLoc,
2236 Args, RParenLoc, ExecConfig);
2259 "unnamed member not of record type?");
2262 getSema().PerformObjectMemberConversion(BaseResult.get(),
2265 if (BaseResult.isInvalid())
2267 Base = BaseResult.get();
2270 return getSema().BuildFieldReferenceExpr(
2271 Base, isArrow, OpLoc, EmptySS, cast<FieldDecl>(Member),
2276 SS.
Adopt(QualifierLoc);
2278 Base = BaseResult.
get();
2290 return getSema().BuildMemberReferenceExpr(Base, BaseType, OpLoc, isArrow,
2292 FirstQualifierInScope,
2293 R, ExplicitTemplateArgs,
2304 return getSema().BuildBinOp(
nullptr, OpLoc, Opc, LHS, RHS);
2316 return getSema().ActOnConditionalOp(QuestionLoc, ColonLoc, Cond,
2328 return getSema().BuildCStyleCastExpr(LParenLoc, TInfo, RParenLoc,
2340 return getSema().BuildCompoundLiteralExpr(LParenLoc, TInfo, RParenLoc,
2355 return getSema().BuildMemberReferenceExpr(Base, Base->
getType(),
2408 return getSema().BuildVAArgExpr(BuiltinLoc,
2420 return getSema().ActOnParenListExpr(LParenLoc, RParenLoc, SubExprs);
2430 return getSema().ActOnAddrLabel(AmpAmpLoc, LabelLoc, Label);
2440 return getSema().ActOnStmtExpr(LParenLoc, SubStmt, RParenLoc);
2462 Expr *ControllingExpr,
2465 return getSema().CreateGenericSelectionExpr(KeyLoc, DefaultLoc, RParenLoc,
2466 ControllingExpr, Types, Exprs);
2498 case Stmt::CXXStaticCastExprClass:
2499 return getDerived().RebuildCXXStaticCastExpr(OpLoc, LAngleLoc, TInfo,
2500 RAngleLoc, LParenLoc,
2501 SubExpr, RParenLoc);
2503 case Stmt::CXXDynamicCastExprClass:
2504 return getDerived().RebuildCXXDynamicCastExpr(OpLoc, LAngleLoc, TInfo,
2505 RAngleLoc, LParenLoc,
2506 SubExpr, RParenLoc);
2508 case Stmt::CXXReinterpretCastExprClass:
2509 return getDerived().RebuildCXXReinterpretCastExpr(OpLoc, LAngleLoc, TInfo,
2510 RAngleLoc, LParenLoc,
2514 case Stmt::CXXConstCastExprClass:
2515 return getDerived().RebuildCXXConstCastExpr(OpLoc, LAngleLoc, TInfo,
2516 RAngleLoc, LParenLoc,
2517 SubExpr, RParenLoc);
2520 llvm_unreachable(
"Invalid C++ named cast");
2535 return getSema().BuildCXXNamedCast(OpLoc, tok::kw_static_cast,
2552 return getSema().BuildCXXNamedCast(OpLoc, tok::kw_dynamic_cast,
2569 return getSema().BuildCXXNamedCast(OpLoc, tok::kw_reinterpret_cast,
2586 return getSema().BuildCXXNamedCast(OpLoc, tok::kw_const_cast,
2600 bool ListInitialization) {
2601 return getSema().BuildCXXTypeConstructExpr(TInfo, LParenLoc,
2603 ListInitialization);
2614 return getSema().BuildCXXTypeId(TypeInfoType, TypeidLoc, Operand,
2627 return getSema().BuildCXXTypeId(TypeInfoType, TypeidLoc, Operand,
2639 return getSema().BuildCXXUuidof(TypeInfoType, TypeidLoc, Operand,
2651 return getSema().BuildCXXUuidof(TypeInfoType, TypeidLoc, Operand,
2663 getSema().CheckCXXThisCapture(ThisLoc);
2664 return new (getSema().Context)
CXXThisExpr(ThisLoc, ThisType, isImplicit);
2672 bool IsThrownVariableInScope) {
2673 return getSema().BuildCXXThrow(ThrowLoc, Sub, IsThrownVariableInScope);
2703 return getSema().BuildCXXTypeConstructExpr(
2704 TSInfo, LParenLoc, None, RParenLoc,
false);
2721 Expr *Initializer) {
2722 return getSema().BuildCXXNew(StartLoc, UseGlobal,
2739 bool IsGlobalDelete,
2742 return getSema().ActOnCXXDelete(StartLoc, IsGlobalDelete, IsArrayForm,
2754 return getSema().BuildTypeTrait(Trait, StartLoc, Args, RParenLoc);
2766 return getSema().BuildArrayTypeTrait(Trait, StartLoc, TSInfo, DimExpr, RParenLoc);
2777 return getSema().BuildExpressionTrait(Trait, StartLoc, Queried, RParenLoc);
2790 bool IsAddressOfOperand,
2793 SS.
Adopt(QualifierLoc);
2795 if (TemplateArgs || TemplateKWLoc.
isValid())
2796 return getSema().BuildQualifiedTemplateIdExpr(SS, TemplateKWLoc, NameInfo,
2799 return getSema().BuildQualifiedDeclarationNameExpr(
2800 SS, NameInfo, IsAddressOfOperand,
nullptr, RecoveryTSI);
2812 return getSema().BuildTemplateIdExpr(SS, TemplateKWLoc, R, RequiresADL,
2825 bool HadMultipleCandidates,
2826 bool ListInitialization,
2827 bool StdInitListInitialization,
2828 bool RequiresZeroInit,
2832 if (getSema().CompleteConstructorCall(Constructor, Args, Loc,
2836 return getSema().BuildCXXConstructExpr(Loc, T, Constructor,
2839 HadMultipleCandidates,
2841 StdInitListInitialization,
2842 RequiresZeroInit, ConstructKind,
2850 bool ConstructsVBase,
2851 bool InheritedFromVBase) {
2853 Loc, T, Constructor, ConstructsVBase, InheritedFromVBase);
2864 bool ListInitialization) {
2865 return getSema().BuildCXXTypeConstructExpr(
2866 TSInfo, LParenOrBraceLoc, Args, RParenOrBraceLoc, ListInitialization);
2877 bool ListInitialization) {
2878 return getSema().BuildCXXTypeConstructExpr(TSInfo, LParenLoc, Args,
2879 RParenLoc, ListInitialization);
2896 SS.
Adopt(QualifierLoc);
2899 OperatorLoc, IsArrow,
2901 FirstQualifierInScope,
2903 TemplateArgs,
nullptr);
2919 SS.
Adopt(QualifierLoc);
2922 OperatorLoc, IsArrow,
2924 FirstQualifierInScope,
2925 R, TemplateArgs,
nullptr);
2944 RParenLoc, Length, PartialArgs);
2952 return getSema().BuildObjCBoxedExpr(SR, ValueExpr);
2960 Expr **Elements,
unsigned NumElements) {
2961 return getSema().BuildObjCArrayLiteral(Range,
2969 return getSema().BuildObjCSubscriptExpression(RB, Base, Key,
2970 getterMethod, setterMethod);
2979 return getSema().BuildObjCDictionaryLiteral(Range, Elements);
3003 Sel, Method, LBracLoc, SelectorLocs,
3018 Sel, Method, LBracLoc, SelectorLocs,
3034 Sel, Method, LBracLoc, SelectorLocs,
3039 Sel, Method, LBracLoc, SelectorLocs,
3051 bool IsArrow,
bool IsFreeIvar) {
3054 ExprResult Result = getSema().BuildMemberReferenceExpr(
3060 if (IsFreeIvar && Result.isUsable())
3061 cast<ObjCIvarRefExpr>(Result.get())->setIsFreeIvar(IsFreeIvar);
3074 return getSema().BuildMemberReferenceExpr(BaseArg, BaseArg->
getType(),
3097 PropertyLoc, Base));
3108 return getSema().BuildMemberReferenceExpr(BaseArg, BaseArg->
getType(),
3129 assert(!Lookup.
empty() &&
"No __builtin_shufflevector?");
3138 CK_BuiltinFnToFnPtr).
get();
3142 SemaRef.
Context, Callee, SubExprs, Builtin->getCallResultType(),
3154 BuiltinLoc, RParenLoc);
3169 EllipsisLoc, NumExpansions);
3190 llvm_unreachable(
"Pack expansion pattern has no parameter packs");
3212 return getSema().CheckPackExpansion(Pattern, EllipsisLoc, NumExpansions);
3223 return getSema().BuildCXXFoldExpr(LParenLoc, LHS, Operator, EllipsisLoc,
3233 return getSema().BuildEmptyCXXFoldExpr(EllipsisLoc, Operator);
3269 bool DeducibleTSTContext);
3272 template<
typename Derived>
3281 #define STMT(Node, Parent) \ 3282 case Stmt::Node##Class: return getDerived().Transform##Node(cast<Node>(S)); 3283 #define ABSTRACT_STMT(Node) 3284 #define EXPR(Node, Parent) 3285 #include "clang/AST/StmtNodes.inc" 3288 #define STMT(Node, Parent) 3289 #define ABSTRACT_STMT(Stmt) 3290 #define EXPR(Node, Parent) case Stmt::Node##Class: 3291 #include "clang/AST/StmtNodes.inc" 3293 ExprResult E = getDerived().TransformExpr(cast<Expr>(S));
3297 return getSema().ActOnExprStmt(E);
3304 template<
typename Derived>
3312 #define OPENMP_CLAUSE(Name, Class) \ 3313 case OMPC_ ## Name : \ 3314 return getDerived().Transform ## Class(cast<Class>(S)); 3315 #include "clang/Basic/OpenMPKinds.def" 3322 template<
typename Derived>
3329 #define STMT(Node, Parent) case Stmt::Node##Class: break; 3330 #define ABSTRACT_STMT(Stmt) 3331 #define EXPR(Node, Parent) \ 3332 case Stmt::Node##Class: return getDerived().Transform##Node(cast<Node>(E)); 3333 #include "clang/AST/StmtNodes.inc" 3339 template<
typename Derived>
3347 if (
auto *FE = dyn_cast<FullExpr>(Init))
3348 Init = FE->getSubExpr();
3350 if (
auto *AIL = dyn_cast<ArrayInitLoopExpr>(Init))
3351 Init = AIL->getCommonExpr();
3354 Init = MTE->GetTemporaryExpr();
3357 Init = Binder->getSubExpr();
3360 Init = ICE->getSubExprAsWritten();
3363 dyn_cast<CXXStdInitializerListExpr>(Init))
3364 return TransformInitializer(ILE->getSubExpr(), NotCopyInit);
3370 if (!NotCopyInit && !(Construct && Construct->isListInitialization()))
3371 return getDerived().TransformExpr(Init);
3376 return getDerived().RebuildParenListExpr(Parens.
getBegin(), None,
3381 if (isa<ImplicitValueInitExpr>(Init))
3387 if (!Construct || isa<CXXTemporaryObjectExpr>(Construct))
3388 return getDerived().TransformExpr(Init);
3392 if (Construct && Construct->isStdInitListInitialization())
3393 return TransformInitializer(Construct->getArg(0), NotCopyInit);
3398 Construct->isListInitialization());
3401 bool ArgChanged =
false;
3402 if (getDerived().TransformExprs(Construct->getArgs(), Construct->getNumArgs(),
3403 true, NewArgs, &ArgChanged))
3407 if (Construct->isListInitialization())
3408 return getDerived().RebuildInitList(Construct->getBeginLoc(), NewArgs,
3409 Construct->getEndLoc());
3412 SourceRange Parens = Construct->getParenOrBraceRange();
3416 assert(NewArgs.empty() &&
3417 "no parens or braces but have direct init with arguments?");
3420 return getDerived().RebuildParenListExpr(Parens.
getBegin(), NewArgs,
3424 template<
typename Derived>
3430 for (
unsigned I = 0; I != NumInputs; ++I) {
3432 if (IsCall && getDerived().DropCallArgument(Inputs[I])) {
3440 Expr *Pattern = Expansion->getPattern();
3443 getSema().collectUnexpandedParameterPacks(Pattern, Unexpanded);
3444 assert(!Unexpanded.empty() &&
"Pack expansion without parameter packs?");
3449 bool RetainExpansion =
false;
3452 if (getDerived().TryExpandParameterPacks(Expansion->getEllipsisLoc(),
3455 Expand, RetainExpansion,
3464 ExprResult OutPattern = getDerived().TransformExpr(Pattern);
3468 ExprResult Out = getDerived().RebuildPackExpansion(OutPattern.
get(),
3469 Expansion->getEllipsisLoc(),
3476 Outputs.push_back(Out.
get());
3482 if (ArgChanged) *ArgChanged =
true;
3486 for (
unsigned I = 0; I != *NumExpansions; ++I) {
3488 ExprResult Out = getDerived().TransformExpr(Pattern);
3492 if (Out.
get()->containsUnexpandedParameterPack()) {
3493 Out = getDerived().RebuildPackExpansion(
3494 Out.
get(), Expansion->getEllipsisLoc(), OrigNumExpansions);
3499 Outputs.push_back(Out.
get());
3504 if (RetainExpansion) {
3505 ForgetPartiallySubstitutedPackRAII Forget(getDerived());
3507 ExprResult Out = getDerived().TransformExpr(Pattern);
3511 Out = getDerived().RebuildPackExpansion(
3512 Out.
get(), Expansion->getEllipsisLoc(), OrigNumExpansions);
3516 Outputs.push_back(Out.
get());
3523 IsCall ? getDerived().TransformInitializer(Inputs[I],
false)
3524 : getDerived().TransformExpr(Inputs[I]);
3528 if (Result.
get() != Inputs[I] && ArgChanged)
3531 Outputs.push_back(Result.
get());
3537 template <
typename Derived>
3541 VarDecl *ConditionVar = cast_or_null<VarDecl>(
3542 getDerived().TransformDefinition(Var->
getLocation(), Var));
3547 return getSema().ActOnConditionVariable(ConditionVar, Loc, Kind);
3551 ExprResult CondExpr = getDerived().TransformExpr(Expr);
3556 return getSema().ActOnCondition(
nullptr, Loc, CondExpr.
get(),
Kind);
3562 template<
typename Derived>
3571 Qualifiers.push_back(Qualifier);
3574 while (!Qualifiers.empty()) {
3582 if (SemaRef.BuildCXXNestedNameSpecifier(
nullptr, IdInfo,
false,
3583 SS, FirstQualifierInScope,
false))
3590 = cast_or_null<NamespaceDecl>(
3591 getDerived().TransformDecl(
3600 = cast_or_null<NamespaceAliasDecl>(
3616 cast_or_null<CXXRecordDecl>(getDerived().TransformDecl(
3625 FirstQualifierInScope, SS);
3631 (SemaRef.getLangOpts().CPlusPlus11 &&
3634 "Can't get cv-qualifiers here");
3637 diag::warn_cxx98_compat_enum_nested_name_spec);
3646 SemaRef.Diag(TL.
getBeginLoc(), diag::err_nested_name_spec_non_tag)
3654 FirstQualifierInScope =
nullptr;
3660 !getDerived().AlwaysRebuild())
3673 template<
typename Derived>
3693 TemplateDecl *NewTemplate = cast_or_null<TemplateDecl>(
3694 getDerived().TransformDecl(NameInfo.
getLoc(), OldTemplate));
3700 SemaRef.Context.DeclarationNames.getCXXDeductionGuideName(NewTemplate));
3710 NewTInfo = getDerived().TransformType(OldTInfo);
3713 NewCanTy = SemaRef.Context.getCanonicalType(NewTInfo->
getType());
3721 NewCanTy = SemaRef.Context.getCanonicalType(NewT);
3725 = SemaRef.Context.DeclarationNames.getCXXSpecialName(Name.
getNameKind(),
3734 llvm_unreachable(
"Unknown name kind.");
3737 template<
typename Derived>
3744 bool AllowInjectedClassName) {
3747 assert(Template &&
"qualified template name must refer to a template");
3750 = cast_or_null<TemplateDecl>(getDerived().TransformDecl(NameLoc,
3755 if (!getDerived().AlwaysRebuild() &&
3757 TransTemplate == Template)
3760 return getDerived().RebuildTemplateName(SS, QTN->hasTemplateKeyword(),
3768 FirstQualifierInScope =
nullptr;
3771 if (!getDerived().AlwaysRebuild() &&
3779 if (DTN->isIdentifier()) {
3780 return getDerived().RebuildTemplateName(SS,
3782 *DTN->getIdentifier(),
3785 FirstQualifierInScope,
3786 AllowInjectedClassName);
3789 return getDerived().RebuildTemplateName(SS, TemplateKWLoc,
3790 DTN->getOperator(), NameLoc,
3791 ObjectType, AllowInjectedClassName);
3796 = cast_or_null<TemplateDecl>(getDerived().TransformDecl(NameLoc,
3801 if (!getDerived().AlwaysRebuild() &&
3802 TransTemplate == Template)
3811 = cast_or_null<TemplateTemplateParmDecl>(
3812 getDerived().TransformDecl(NameLoc, SubstPack->getParameterPack()));
3816 if (!getDerived().AlwaysRebuild() &&
3817 TransParam == SubstPack->getParameterPack())
3820 return getDerived().RebuildTemplateName(TransParam,
3821 SubstPack->getArgumentPack());
3825 llvm_unreachable(
"overloaded function decl survived to here");
3828 template<
typename Derived>
3835 llvm_unreachable(
"null template argument in TreeTransform");
3840 SemaRef.Context.getTrivialTypeSourceInfo(Arg.
getAsType(), Loc));
3849 Builder.
MakeTrivial(SemaRef.Context, DTN->getQualifier(), Loc);
3851 Builder.
MakeTrivial(SemaRef.Context, QTN->getQualifier(), Loc);
3878 template<
typename Derived>
3893 llvm_unreachable(
"Unexpected TemplateArgument");
3900 DI = getDerived().TransformType(DI);
3901 if (!DI)
return true;
3910 QualifierLoc = getDerived().TransformNestedNameSpecifierLoc(QualifierLoc);
3916 SS.
Adopt(QualifierLoc);
3918 = getDerived().TransformTemplateName(SS, Arg.
getAsTemplate(),
3929 llvm_unreachable(
"Caller should expand pack expansions");
3941 ExprResult E = getDerived().TransformExpr(InputExpr);
3942 E = SemaRef.ActOnConstantExpression(E);
3955 template<
typename Derived,
typename InputIterator>
3963 typedef typename std::iterator_traits<InputIterator>::difference_type
3980 : Self(Self), Iter(Iter) { }
4003 return X.Iter == Y.Iter;
4008 return X.Iter != Y.Iter;
4012 template<
typename Derived>
4013 template<
typename InputIterator>
4017 for (; First != Last; ++First) {
4030 if (TransformTemplateArguments(PackLocIterator(*
this,
4032 PackLocIterator(*
this,
4046 = getSema().getTemplateArgumentPackExpansionPattern(
4047 In, Ellipsis, OrigNumExpansions);
4050 getSema().collectUnexpandedParameterPacks(Pattern, Unexpanded);
4051 assert(!Unexpanded.empty() &&
"Pack expansion without parameter packs?");
4056 bool RetainExpansion =
false;
4058 if (getDerived().TryExpandParameterPacks(Ellipsis,
4072 if (getDerived().TransformTemplateArgument(Pattern, OutPattern, Uneval))
4075 Out = getDerived().RebuildPackExpansion(OutPattern, Ellipsis,
4086 for (
unsigned I = 0; I != *NumExpansions; ++I) {
4089 if (getDerived().TransformTemplateArgument(Pattern, Out, Uneval))
4093 Out = getDerived().RebuildPackExpansion(Out, Ellipsis,
4104 if (RetainExpansion) {
4105 ForgetPartiallySubstitutedPackRAII Forget(getDerived());
4107 if (getDerived().TransformTemplateArgument(Pattern, Out, Uneval))
4110 Out = getDerived().RebuildPackExpansion(Out, Ellipsis,
4122 if (getDerived().TransformTemplateArgument(In, Out, Uneval))
4136 template<
typename Derived>
4138 if (getDerived().AlreadyTransformed(T))
4143 TypeSourceInfo *DI = getSema().Context.getTrivialTypeSourceInfo(T,
4144 getDerived().getBaseLocation());
4154 template<
typename Derived>
4158 getDerived().getBaseEntity());
4159 if (getDerived().AlreadyTransformed(DI->
getType()))
4167 QualType Result = getDerived().TransformType(TLB, TL);
4174 template<
typename Derived>
4178 #define ABSTRACT_TYPELOC(CLASS, PARENT) 4179 #define TYPELOC(CLASS, PARENT) \ 4180 case TypeLoc::CLASS: \ 4181 return getDerived().Transform##CLASS##Type(TLB, \ 4182 T.castAs<CLASS##TypeLoc>()); 4183 #include "clang/AST/TypeLocNodes.def" 4186 llvm_unreachable(
"unhandled type loc!");
4189 template<
typename Derived>
4191 if (!isa<DependentNameType>(T))
4192 return TransformType(T);
4194 if (getDerived().AlreadyTransformed(T))
4196 TypeSourceInfo *DI = getSema().Context.getTrivialTypeSourceInfo(T,
4197 getDerived().getBaseLocation());
4198 TypeSourceInfo *NewDI = getDerived().TransformTypeWithDeducedTST(DI);
4202 template<
typename Derived>
4205 if (!isa<DependentNameType>(DI->
getType()))
4206 return TransformType(DI);
4210 getDerived().getBaseEntity());
4211 if (getDerived().AlreadyTransformed(DI->
getType()))
4225 QualType Result = getDerived().TransformDependentNameType(
4227 if (Result.isNull())
4231 Result = getDerived().RebuildQualifiedType(Result, QTL);
4232 if (Result.isNull())
4240 template<
typename Derived>
4248 Result = getDerived().RebuildQualifiedType(Result, T);
4261 template <
typename Derived>
4271 SemaRef.Diag(Loc, diag::err_address_space_mismatch_templ_inst)
4280 T = SemaRef.getASTContext().getAddrSpaceQualType(T,
4308 = dyn_cast<SubstTemplateTypeParmType>(T)) {
4309 QualType Replacement = SubstTypeParam->getReplacementType();
4312 Replacement = SemaRef.Context.getQualifiedType(
4314 T = SemaRef.Context.getSubstTemplateTypeParmType(
4315 SubstTypeParam->getReplacedParameter(), Replacement);
4316 }
else if ((AutoTy = dyn_cast<AutoType>(T)) && AutoTy->
isDeduced()) {
4323 T = SemaRef.Context.getAutoType(Deduced, AutoTy->
getKeyword(),
4329 SemaRef.Diag(Loc, diag::err_attr_objc_ownership_redundant) << T;
4335 return SemaRef.BuildQualifiedType(T, Loc, Quals);
4338 template<
typename Derived>
4344 if (getDerived().AlreadyTransformed(TL.
getType()))
4348 TransformTSIInObjectScope(TL, ObjectType, UnqualLookup, SS);
4354 template<
typename Derived>
4360 if (getDerived().AlreadyTransformed(TSInfo->
getType()))
4363 return TransformTSIInObjectScope(TSInfo->
getTypeLoc(), ObjectType,
4367 template <
typename Derived>
4372 assert(!getDerived().AlreadyTransformed(T));
4377 if (isa<TemplateSpecializationType>(T)) {
4381 TemplateName Template = getDerived().TransformTemplateName(
4383 ObjectType, UnqualLookup,
true);
4384 if (Template.isNull())
4387 Result = getDerived().TransformTemplateSpecializationType(TLB, SpecTL,
4389 }
else if (isa<DependentTemplateSpecializationType>(T)) {
4394 = getDerived().RebuildTemplateName(SS,
4398 ObjectType, UnqualLookup,
4400 if (Template.isNull())
4403 Result = getDerived().TransformDependentTemplateSpecializationType(TLB,
4409 Result = getDerived().TransformType(TLB, TL);
4418 template <
class TyLoc>
static inline 4420 TyLoc NewT = TLB.
push<TyLoc>(T.getType());
4421 NewT.setNameLoc(T.getNameLoc());
4425 template<
typename Derived>
4435 template<
typename Derived>
4442 template <
typename Derived>
4449 template<
typename Derived>
4453 if (OriginalType.
isNull())
4457 if (getDerived().AlwaysRebuild() ||
4459 Result = SemaRef.Context.getDecayedType(OriginalType);
4465 template<
typename Derived>
4470 if (PointeeType.
isNull())
4479 Result = SemaRef.Context.getObjCObjectPointerType(PointeeType);
4486 if (getDerived().AlwaysRebuild() ||
4488 Result = getDerived().RebuildPointerType(PointeeType, TL.
getSigilLoc());
4502 template<
typename Derived>
4508 if (PointeeType.
isNull())
4512 if (getDerived().AlwaysRebuild() ||
4514 Result = getDerived().RebuildBlockPointerType(PointeeType,
4529 template<
typename Derived>
4537 if (PointeeType.
isNull())
4541 if (getDerived().AlwaysRebuild() ||
4543 Result = getDerived().RebuildReferenceType(PointeeType,
4557 if (isa<LValueReferenceType>(Result))
4566 template<
typename Derived>
4570 return TransformReferenceType(TLB, TL);
4573 template<
typename Derived>
4577 return TransformReferenceType(TLB, TL);
4580 template<
typename Derived>
4585 if (PointeeType.
isNull())
4591 NewClsTInfo = getDerived().TransformType(OldClsTInfo);
4600 NewClsType = NewClsTInfo->
getType();
4602 NewClsType = getDerived().TransformType(OldClsType);
4603 if (NewClsType.isNull())
4608 if (getDerived().AlwaysRebuild() ||
4610 NewClsType != OldClsType) {
4611 Result = getDerived().RebuildMemberPointerType(PointeeType, NewClsType,
4627 NewTL.setClassTInfo(NewClsTInfo);
4632 template<
typename Derived>
4638 if (ElementType.
isNull())
4642 if (getDerived().AlwaysRebuild() ||
4644 Result = getDerived().RebuildConstantArrayType(ElementType,
4665 Size = getDerived().TransformExpr(Size).template getAs<Expr>();
4666 Size = SemaRef.ActOnConstantExpression(Size).get();
4673 template<
typename Derived>
4679 if (ElementType.
isNull())
4683 if (getDerived().AlwaysRebuild() ||
4685 Result = getDerived().RebuildIncompleteArrayType(ElementType,
4701 template<
typename Derived>
4707 if (ElementType.
isNull())
4714 SizeResult = getDerived().TransformExpr(T->
getSizeExpr());
4718 SizeResult = SemaRef.ActOnFinishFullExpr(SizeResult.
get());
4722 Expr *Size = SizeResult.
get();
4725 if (getDerived().AlwaysRebuild() ||
4728 Result = getDerived().RebuildVariableArrayType(ElementType,
4747 template<
typename Derived>
4753 if (ElementType.
isNull())
4765 = getDerived().TransformExpr(origSize);
4766 sizeResult = SemaRef.ActOnConstantExpression(sizeResult);
4770 Expr *size = sizeResult.
get();
4773 if (getDerived().AlwaysRebuild() ||
4776 Result = getDerived().RebuildDependentSizedArrayType(ElementType,
4795 template <
typename Derived>
4800 if (ElementType.
isNull())
4807 Size = SemaRef.ActOnConstantExpression(Size);
4812 if (getDerived().AlwaysRebuild() || ElementType != T->
getElementType() ||
4814 Result = getDerived().RebuildDependentVectorType(
4821 if (isa<DependentVectorType>(Result)) {
4833 template<
typename Derived>
4841 if (ElementType.
isNull())
4849 Size = SemaRef.ActOnConstantExpression(Size);
4854 if (getDerived().AlwaysRebuild() ||
4857 Result = getDerived().RebuildDependentSizedExtVectorType(ElementType,
4865 if (isa<DependentSizedExtVectorType>(Result)) {
4877 template <
typename Derived>
4884 if (pointeeType.
isNull())
4892 AddrSpace = SemaRef.ActOnConstantExpression(AddrSpace);
4897 if (getDerived().AlwaysRebuild() || pointeeType != T->
getPointeeType() ||
4899 Result = getDerived().RebuildDependentAddressSpaceType(
4906 if (isa<DependentAddressSpaceType>(Result)) {
4916 Result, getDerived().getBaseLocation());
4923 template <
typename Derived>
4928 if (ElementType.
isNull())
4932 if (getDerived().AlwaysRebuild() ||
4934 Result = getDerived().RebuildVectorType(ElementType, T->
getNumElements(),
4946 template<
typename Derived>
4951 if (ElementType.
isNull())
4955 if (getDerived().AlwaysRebuild() ||
4957 Result = getDerived().RebuildExtVectorType(ElementType,
4970 template <
typename Derived>
4973 bool ExpectParameterPack) {
4977 if (NumExpansions && isa<PackExpansionType>(OldDI->
getType())) {
4987 QualType Result = getDerived().TransformType(TLB,
4992 Result = RebuildPackExpansionType(Result,
5002 NewDI = TLB.getTypeSourceInfo(SemaRef.Context, Result);
5004 NewDI = getDerived().TransformType(OldDI);
5008 if (NewDI == OldDI && indexAdjustment == 0)
5025 template <
typename Derived>
5033 int indexAdjustment = 0;
5035 unsigned NumParams = Params.size();
5036 for (
unsigned i = 0; i != NumParams; ++i) {
5038 assert(OldParm->getFunctionScopeIndex() == i);
5042 if (OldParm->isParameterPack()) {
5047 TypeLoc TL = OldParm->getTypeSourceInfo()->getTypeLoc();
5050 SemaRef.collectUnexpandedParameterPacks(Pattern, Unexpanded);
5051 assert(Unexpanded.size() > 0 &&
"Could not find parameter packs!");
5054 bool ShouldExpand =
false;
5055 bool RetainExpansion =
false;
5058 NumExpansions = OrigNumExpansions;
5059 if (getDerived().TryExpandParameterPacks(ExpansionTL.
getEllipsisLoc(),
5060 Pattern.getSourceRange(),
5071 getDerived().ExpandingFunctionParameterPack(OldParm);
5072 for (
unsigned I = 0; I != *NumExpansions; ++I) {
5075 = getDerived().TransformFunctionTypeParam(OldParm,
5083 PInfos.
set(OutParamTypes.size(), ParamInfos[i]);
5084 OutParamTypes.push_back(NewParm->
getType());
5086 PVars->push_back(NewParm);
5091 if (RetainExpansion) {
5092 ForgetPartiallySubstitutedPackRAII Forget(getDerived());
5094 = getDerived().TransformFunctionTypeParam(OldParm,
5102 PInfos.
set(OutParamTypes.size(), ParamInfos[i]);
5103 OutParamTypes.push_back(NewParm->
getType());
5105 PVars->push_back(NewParm);
5121 NewParm = getDerived().TransformFunctionTypeParam(OldParm,
5126 NewParm = getDerived().TransformFunctionTypeParam(
5127 OldParm, indexAdjustment, None,
false);
5134 PInfos.
set(OutParamTypes.size(), ParamInfos[i]);
5135 OutParamTypes.push_back(NewParm->
getType());
5137 PVars->push_back(NewParm);
5144 bool IsPackExpansion =
false;
5148 = dyn_cast<PackExpansionType>(OldType)) {
5150 QualType Pattern = Expansion->getPattern();
5152 getSema().collectUnexpandedParameterPacks(Pattern, Unexpanded);
5155 bool ShouldExpand =
false;
5156 bool RetainExpansion =
false;
5157 if (getDerived().TryExpandParameterPacks(Loc,
SourceRange(),
5168 for (
unsigned I = 0; I != *NumExpansions; ++I) {
5170 QualType NewType = getDerived().TransformType(Pattern);
5176 getSema().getASTContext().getPackExpansionType(NewType, None);
5183 PInfos.
set(OutParamTypes.size(), ParamInfos[i]);
5184 OutParamTypes.push_back(NewType);
5186 PVars->push_back(
nullptr);
5195 if (RetainExpansion) {
5196 ForgetPartiallySubstitutedPackRAII Forget(getDerived());
5197 QualType NewType = getDerived().TransformType(Pattern);
5202 PInfos.
set(OutParamTypes.size(), ParamInfos[i]);
5203 OutParamTypes.push_back(NewType);
5205 PVars->push_back(
nullptr);
5210 OldType = Expansion->getPattern();
5211 IsPackExpansion =
true;
5213 NewType = getDerived().TransformType(OldType);
5215 NewType = getDerived().TransformType(OldType);
5221 if (IsPackExpansion)
5222 NewType = getSema().Context.getPackExpansionType(NewType,
5226 PInfos.
set(OutParamTypes.size(), ParamInfos[i]);
5227 OutParamTypes.push_back(NewType);
5229 PVars->push_back(
nullptr);
5234 for (
unsigned i = 0, e = PVars->size(); i != e; ++i)
5236 assert(parm->getFunctionScopeIndex() == i);
5243 template<
typename Derived>
5253 ExceptionStorage, Changed);
5257 template<
typename Derived>
template<
typename Fn>
5260 Qualifiers ThisTypeQuals, Fn TransformExceptionSpec) {
5277 if (getDerived().TransformFunctionTypeParams(
5281 ParamTypes, &ParamDecls, ExtParamInfos))
5293 ResultType = getDerived().TransformType(TLB, TL.
getReturnLoc());
5299 ResultType = getDerived().TransformType(TLB, TL.
getReturnLoc());
5306 diag::err_attribute_address_function_type);
5310 if (getDerived().TransformFunctionTypeParams(
5314 ParamTypes, &ParamDecls, ExtParamInfos))
5320 bool EPIChanged =
false;
5325 if (
auto NewExtParamInfos =
5329 != llvm::makeArrayRef(NewExtParamInfos, ParamTypes.size())) {
5339 if (getDerived().AlwaysRebuild() || ResultType != T->
getReturnType() ||
5340 T->
getParamTypes() != llvm::makeArrayRef(ParamTypes) || EPIChanged) {
5341 Result = getDerived().RebuildFunctionProtoType(ResultType, ParamTypes, EPI);
5352 for (
unsigned i = 0, e = NewTL.
getNumParams(); i != e; ++i)
5358 template<
typename Derived>
5374 getSema().ActOnNoexceptSpec(Loc, NoexceptExpr.
get(), EST);
5395 SemaRef.collectUnexpandedParameterPacks(PackExpansion->getPattern(),
5397 assert(!Unexpanded.empty() &&
"Pack expansion without parameter packs?");
5402 bool Expand =
false;
5403 bool RetainExpansion =
false;
5407 if (getDerived().TryExpandParameterPacks(
5409 RetainExpansion, NumExpansions))
5417 QualType U = getDerived().TransformType(PackExpansion->getPattern());
5421 U = SemaRef.Context.getPackExpansionType(U, NumExpansions);
5422 Exceptions.push_back(U);
5428 for (
unsigned ArgIdx = 0; ArgIdx != *NumExpansions; ++ArgIdx) {
5431 QualType U = getDerived().TransformType(PackExpansion->getPattern());
5432 if (U.
isNull() || SemaRef.CheckSpecifiedExceptionType(U, Loc))
5435 Exceptions.push_back(U);
5438 QualType U = getDerived().TransformType(T);
5439 if (U.
isNull() || SemaRef.CheckSpecifiedExceptionType(U, Loc))
5444 Exceptions.push_back(U);
5454 template<
typename Derived>
5464 if (getDerived().AlwaysRebuild() || ResultType != T->
getReturnType())
5465 Result = getDerived().RebuildFunctionNoProtoType(ResultType);
5476 template<
typename Derived>
QualType 5485 if (getDerived().AlwaysRebuild() || D != T->
getDecl()) {
5486 Result = getDerived().RebuildUnresolvedUsingType(TL.
getNameLoc(), D);
5499 template<
typename Derived>
5504 = cast_or_null<TypedefNameDecl>(getDerived().TransformDecl(TL.
getNameLoc(),
5510 if (getDerived().AlwaysRebuild() ||
5512 Result = getDerived().RebuildTypedefType(Typedef);
5523 template<
typename Derived>
5535 E = SemaRef.HandleExprEvaluationContextForTypeof(E.
get());
5540 if (getDerived().AlwaysRebuild() ||
5542 Result = getDerived().RebuildTypeOfExprType(E.
get(), TL.
getTypeofLoc());
5556 template<
typename Derived>
5560 TypeSourceInfo* New_Under_TI = getDerived().TransformType(Old_Under_TI);
5565 if (getDerived().AlwaysRebuild() || New_Under_TI != Old_Under_TI) {
5566 Result = getDerived().RebuildTypeOfType(New_Under_TI->
getType());
5580 template<
typename Derived>
5594 E = getSema().ActOnDecltypeExpression(E.
get());
5599 if (getDerived().AlwaysRebuild() ||
5601 Result = getDerived().RebuildDecltypeType(E.
get(), TL.
getNameLoc());
5613 template<
typename Derived>
5622 Result = getDerived().RebuildUnaryTransformType(NewBase,
5636 template<
typename Derived>
5642 if (!OldDeduced.
isNull()) {
5643 NewDeduced = getDerived().TransformType(OldDeduced);
5649 if (getDerived().AlwaysRebuild() || NewDeduced != OldDeduced ||
5651 Result = getDerived().RebuildAutoType(NewDeduced, T->
getKeyword());
5662 template<
typename Derived>
5670 if (TemplateName.
isNull())
5675 if (!OldDeduced.
isNull()) {
5676 NewDeduced = getDerived().TransformType(OldDeduced);
5681 QualType Result = getDerived().RebuildDeducedTemplateSpecializationType(
5682 TemplateName, NewDeduced);
5693 template<
typename Derived>
5698 = cast_or_null<RecordDecl>(getDerived().TransformDecl(TL.
getNameLoc(),
5704 if (getDerived().AlwaysRebuild() ||
5706 Result = getDerived().RebuildRecordType(Record);
5717 template<
typename Derived>
5722 = cast_or_null<EnumDecl>(getDerived().TransformDecl(TL.
getNameLoc(),
5728 if (getDerived().AlwaysRebuild() ||
5730 Result = getDerived().RebuildEnumType(Enum);
5741 template<
typename Derived>
5749 QualType T = SemaRef.Context.getTypeDeclType(cast<TypeDecl>(D));
5754 template<
typename Derived>
5761 template<
typename Derived>
5772 if (Replacement.isNull())
5789 template<
typename Derived>
5796 template<
typename Derived>
5811 return getDerived().TransformTemplateSpecializationType(TLB, TL, Template);
5814 template<
typename Derived>
5822 if (getDerived().AlwaysRebuild() ||
5824 Result = getDerived().RebuildAtomicType(ValueType, TL.
getKWLoc());
5837 template <
typename Derived>
5848 Result = getDerived().RebuildPipeType(ValueType, TL.
getKWLoc(), isReadPipe);
5864 template<
typename ArgLocContainer>
5866 ArgLocContainer *Container;
5891 : Container(&Container), Index(Index) { }
5905 return Container->getArgLoc(Index);
5909 return pointer(Container->getArgLoc(Index));
5914 return X.Container == Y.Container && X.Index == Y.Index;
5924 template <
typename Derived>
5934 if (getDerived().TransformTemplateArguments(ArgIterator(TL, 0),
5942 getDerived().RebuildTemplateSpecializationType(Template,
5951 if (isa<DependentTemplateSpecializationType>(Result)) {
5960 for (
unsigned i = 0, e = NewTemplateArgs.
size(); i != e; ++i)
5971 for (
unsigned i = 0, e = NewTemplateArgs.
size(); i != e; ++i)
5978 template <
typename Derived>
5989 if (getDerived().TransformTemplateArguments(ArgIterator(TL, 0),
5998 = getSema().Context.getDependentTemplateSpecializationType(
6000 DTN->getQualifier(),
6001 DTN->getIdentifier(),
6012 for (
unsigned i = 0, e = NewTemplateArgs.
size(); i != e; ++i)
6018 = getDerived().RebuildTemplateSpecializationType(Template,
6030 for (
unsigned i = 0, e = NewTemplateArgs.
size(); i != e; ++i)
6037 template<
typename Derived>
6067 diag::err_tag_reference_non_tag)
6070 SemaRef.Diag(TAT->getLocation(), diag::note_declared_at);
6076 if (getDerived().AlwaysRebuild() ||
6081 QualifierLoc, NamedT);
6092 template<
typename Derived>
6098 if (modifiedType.
isNull())
6103 const Attr *newAttr = oldAttr ? getDerived().TransformAttr(oldAttr) :
nullptr;
6104 if (oldAttr && !newAttr)
6110 if (getDerived().AlwaysRebuild() ||
6116 if (equivalentType.
isNull())
6124 diag::err_nullability_nonpointer)
6130 result = SemaRef.Context.getAttributedType(TL.
getAttrKind(),
6140 template<
typename Derived>
6149 if (getDerived().AlwaysRebuild() ||
6151 Result = getDerived().RebuildParenType(Inner);
6162 template<
typename Derived>
6165 return TransformDependentNameType(TLB, TL,
false);
6168 template<
typename Derived>
6179 = getDerived().RebuildDependentNameType(T->
getKeyword(),
6189 QualType NamedT = ElabT->getNamedType();
6204 template<
typename Derived>
6217 .TransformDependentTemplateSpecializationType(TLB, TL, QualifierLoc);
6220 template<
typename Derived>
6233 if (getDerived().TransformTemplateArguments(ArgIterator(TL, 0),
6238 QualType Result = getDerived().RebuildDependentTemplateSpecializationType(
6245 if (
const ElaboratedType *ElabT = dyn_cast<ElaboratedType>(Result)) {
6246 QualType NamedT = ElabT->getNamedType();
6255 for (
unsigned I = 0, E = NewTemplateArgs.
size(); I != E; ++I)
6262 }
else if (isa<DependentTemplateSpecializationType>(Result)) {
6271 for (
unsigned I = 0, E = NewTemplateArgs.
size(); I != E; ++I)
6280 for (
unsigned I = 0, E = NewTemplateArgs.
size(); I != E; ++I)
6286 template<
typename Derived>
6295 if (getDerived().AlwaysRebuild() ||
6297 Result = getDerived().RebuildPackExpansionType(Pattern,
6310 template<
typename Derived>
6319 template<
typename Derived>
6330 if (getDerived().AlwaysRebuild() ||
6332 Result = getDerived().RebuildObjCTypeParamType(OTP,
6352 template<
typename Derived>
6373 const auto *PackExpansion = PackExpansionLoc.getType()
6376 SemaRef.collectUnexpandedParameterPacks(PackExpansion->getPattern(),
6378 assert(!Unexpanded.empty() &&
"Pack expansion without parameter packs?");
6382 TypeLoc PatternLoc = PackExpansionLoc.getPatternLoc();
6383 bool Expand =
false;
6384 bool RetainExpansion =
false;
6386 if (getDerived().TryExpandParameterPacks(
6387 PackExpansionLoc.getEllipsisLoc(), PatternLoc.getSourceRange(),
6388 Unexpanded, Expand, RetainExpansion, NumExpansions))
6398 TypeArgBuilder.
reserve(PatternLoc.getFullDataSize());
6399 QualType NewPatternType = getDerived().TransformType(TypeArgBuilder,
6401 if (NewPatternType.
isNull())
6404 QualType NewExpansionType = SemaRef.Context.getPackExpansionType(
6405 NewPatternType, NumExpansions);
6407 NewExpansionLoc.
setEllipsisLoc(PackExpansionLoc.getEllipsisLoc());
6408 NewTypeArgInfos.push_back(
6415 for (
unsigned ArgIdx = 0; ArgIdx != *NumExpansions; ++ArgIdx) {
6419 TypeArgBuilder.
reserve(PatternLoc.getFullDataSize());
6421 QualType NewTypeArg = getDerived().TransformType(TypeArgBuilder,
6426 NewTypeArgInfos.push_back(
6435 QualType NewTypeArg = getDerived().TransformType(TypeArgBuilder, TypeArgLoc);
6440 if (NewTypeArg == TypeArg) {
6441 NewTypeArgInfos.push_back(TypeArgInfo);
6445 NewTypeArgInfos.push_back(
6451 if (getDerived().AlwaysRebuild() || AnyChanged) {
6453 Result = getDerived().RebuildObjCObjectType(
6476 template<
typename Derived>
6481 if (PointeeType.
isNull())
6485 if (getDerived().AlwaysRebuild() ||
6487 Result = getDerived().RebuildObjCObjectPointerType(PointeeType,
6501 template<
typename Derived>
6507 template<
typename Derived>
6510 return getDerived().TransformCompoundStmt(S,
false);
6513 template<
typename Derived>
6519 bool SubStmtInvalid =
false;
6520 bool SubStmtChanged =
false;
6522 for (
auto *B : S->
body()) {
6523 StmtResult Result = getDerived().TransformStmt(B);
6527 if (isa<DeclStmt>(B))
6531 SubStmtInvalid =
true;
6535 SubStmtChanged = SubStmtChanged || Result.
get() != B;
6536 Statements.push_back(Result.
getAs<
Stmt>());
6542 if (!getDerived().AlwaysRebuild() &&
6546 return getDerived().RebuildCompoundStmt(S->
getLBracLoc(),
6552 template<
typename Derived>
6561 LHS = getDerived().TransformExpr(S->
getLHS());
6562 LHS = SemaRef.ActOnCaseExpr(S->
getCaseLoc(), LHS);
6567 RHS = getDerived().TransformExpr(S->
getRHS());
6568 RHS = SemaRef.ActOnCaseExpr(S->
getCaseLoc(), RHS);
6590 return getDerived().RebuildCaseStmtBody(Case.
get(), SubStmt.
get());
6593 template<
typename Derived>
6606 template<
typename Derived>
6620 return getDerived().RebuildLabelStmt(S->
getIdentLoc(),
6625 template <
typename Derived>
6633 #define PRAGMA_SPELLING_ATTR(X) \ 6635 return getDerived().Transform##X##Attr(cast<X##Attr>(R)); 6636 #include "clang/Basic/AttrList.inc" 6642 template <
typename Derived>
6644 bool AttrsChanged =
false;
6648 for (
const auto *I : S->
getAttrs()) {
6649 const Attr *R = getDerived().TransformAttr(I);
6650 AttrsChanged |= (I != R);
6661 return getDerived().RebuildAttributedStmt(S->
getAttrLoc(), Attrs,
6665 template<
typename Derived>
6688 if (!ConstexprConditionValue || *ConstexprConditionValue) {
6689 Then = getDerived().TransformStmt(S->
getThen());
6698 if (!ConstexprConditionValue || !*ConstexprConditionValue) {
6699 Else = getDerived().TransformStmt(S->
getElse());
6704 if (!getDerived().AlwaysRebuild() &&
6716 template<
typename Derived>
6733 = getDerived().RebuildSwitchStmtStart(S->
getSwitchLoc(), Init.
get(), Cond);
6743 return getDerived().RebuildSwitchStmtBody(S->
getSwitchLoc(), Switch.
get(),
6747 template<
typename Derived>
6762 if (!getDerived().AlwaysRebuild() &&
6767 return getDerived().RebuildWhileStmt(S->
getWhileLoc(), Cond, Body.
get());
6770 template<
typename Derived>
6783 if (!getDerived().AlwaysRebuild() &&
6793 template<
typename Derived>
6796 if (getSema().getLangOpts().OpenMP)
6797 getSema().startOpenMPLoop();
6806 if (getSema().getLangOpts().OpenMP && Init.
isUsable())
6807 getSema().ActOnOpenMPLoopInitialization(S->
getForLoc(), Init.
get());
6830 if (!getDerived().AlwaysRebuild() &&
6838 Init.
get(), Cond, FullInc,
6842 template<
typename Derived>
6852 cast<LabelDecl>(LD));
6855 template<
typename Derived>
6861 Target = SemaRef.MaybeCreateExprWithCleanups(Target.
get());
6863 if (!getDerived().AlwaysRebuild() &&
6871 template<
typename Derived>
6877 template<
typename Derived>
6883 template<
typename Derived>
6893 return getDerived().RebuildReturnStmt(S->
getReturnLoc(), Result.
get());
6896 template<
typename Derived>
6899 bool DeclChanged =
false;
6901 for (
auto *D : S->
decls()) {
6902 Decl *Transformed = getDerived().TransformDefinition(D->getLocation(), D);
6906 if (Transformed != D)
6909 Decls.push_back(Transformed);
6912 if (!getDerived().AlwaysRebuild() && !DeclChanged)
6918 template<
typename Derived>
6929 bool ExprsChanged =
false;
6940 ExprResult Result = getDerived().TransformExpr(OutputExpr);
6944 ExprsChanged |= Result.
get() != OutputExpr;
6946 Exprs.push_back(Result.
get());
6950 for (
unsigned I = 0, E = S->
getNumInputs(); I != E; ++I) {
6958 ExprResult Result = getDerived().TransformExpr(InputExpr);
6962 ExprsChanged |= Result.
get() != InputExpr;
6964 Exprs.push_back(Result.
get());
6967 if (!getDerived().AlwaysRebuild() && !ExprsChanged)
6979 Constraints, Exprs, AsmString.
get(),
6983 template<
typename Derived>
6989 bool HadError =
false, HadChange =
false;
6993 TransformedExprs.reserve(SrcExprs.size());
6994 for (
unsigned i = 0, e = SrcExprs.size(); i != e; ++i) {
6995 ExprResult Result = getDerived().TransformExpr(SrcExprs[i]);
6999 HadChange |= (Result.
get() != SrcExprs[i]);
7000 TransformedExprs.push_back(Result.
get());
7005 if (!HadChange && !getDerived().AlwaysRebuild())
7017 template<
typename Derived>
7020 auto *ScopeInfo = SemaRef.getCurFunction();
7021 auto *FD = cast<FunctionDecl>(SemaRef.CurContext);
7022 assert(FD && ScopeInfo && !ScopeInfo->CoroutinePromise &&
7023 ScopeInfo->NeedsCoroutineSuspends &&
7024 ScopeInfo->CoroutineSuspends.first ==
nullptr &&
7025 ScopeInfo->CoroutineSuspends.second ==
nullptr &&
7026 "expected clean scope info");
7030 ScopeInfo->setNeedsCoroutineSuspends(
false);
7034 if (!SemaRef.buildCoroutineParameterMoves(FD->getLocation()))
7036 auto *Promise = SemaRef.buildCoroutinePromise(FD->getLocation());
7040 ScopeInfo->CoroutinePromise = Promise;
7051 ScopeInfo->setCoroutineSuspends(InitSuspend.
get(), FinalSuspend.
get());
7052 assert(isa<Expr>(InitSuspend.
get()) && isa<Expr>(FinalSuspend.
get()));
7059 if (Builder.isInvalid())
7063 assert(ReturnObject &&
"the return object is expected to be valid");
7064 ExprResult Res = getDerived().TransformInitializer(ReturnObject,
7068 Builder.ReturnValue = Res.
get();
7071 assert(!Promise->getType()->isDependentType() &&
7072 "the promise type must no longer be dependent");
7075 "these nodes should not have been built yet");
7076 if (!Builder.buildDependentStatements())
7080 StmtResult Res = getDerived().TransformStmt(OnFallthrough);
7083 Builder.OnFallthrough = Res.
get();
7087 StmtResult Res = getDerived().TransformStmt(OnException);
7090 Builder.OnException = Res.
get();
7094 StmtResult Res = getDerived().TransformStmt(OnAllocFailure);
7097 Builder.ReturnStmtOnAllocFailure = Res.
get();
7102 "allocation and deallocation calls must already be built");
7104 if (AllocRes.isInvalid())
7106 Builder.Allocate = AllocRes.get();
7111 Builder.Deallocate = DeallocRes.
get();
7113 assert(S->
getResultDecl() &&
"ResultDecl must already be built");
7115 if (ResultDecl.isInvalid())
7117 Builder.ResultDecl = ResultDecl.get();
7123 Builder.ReturnStmt = Res.
get();
7127 return getDerived().RebuildCoroutineBodyStmt(Builder);
7130 template<
typename Derived>
7144 template<
typename Derived>
7158 template <
typename Derived>
7174 return getDerived().RebuildDependentCoawaitExpr(
7176 cast<UnresolvedLookupExpr>(LookupResult.
get()));
7179 template<
typename Derived>
7194 template<
typename Derived>
7203 bool AnyCatchChanged =
false;
7210 AnyCatchChanged =
true;
7211 CatchStmts.push_back(Catch.
get());
7223 if (!getDerived().AlwaysRebuild() &&
7230 return getDerived().RebuildObjCAtTryStmt(S->
getAtTryLoc(), TryBody.
get(),
7231 CatchStmts, Finally.
get());
7234 template<
typename Derived>
7241 if (FromVar->getTypeSourceInfo()) {
7242 TSInfo = getDerived().TransformType(FromVar->getTypeSourceInfo());
7251 T = getDerived().TransformType(FromVar->getType());
7256 Var = getDerived().RebuildObjCExceptionDecl(FromVar, TSInfo, T);
7265 return getDerived().RebuildObjCAtCatchStmt(S->
getAtCatchLoc(),
7270 template<
typename Derived>
7279 if (!getDerived().AlwaysRebuild() &&
7288 template<
typename Derived>
7293 Operand = getDerived().TransformExpr(S->
getThrowExpr());
7298 if (!getDerived().AlwaysRebuild() &&
7302 return getDerived().RebuildObjCAtThrowStmt(S->
getThrowLoc(), Operand.
get());
7305 template<
typename Derived>
7325 if (!getDerived().AlwaysRebuild() &&
7332 Object.
get(), Body.
get());
7335 template<
typename Derived>
7345 if (!getDerived().AlwaysRebuild() &&
7350 return getDerived().RebuildObjCAutoreleasePoolStmt(
7354 template<
typename Derived>
7374 if (!getDerived().AlwaysRebuild() &&
7381 return getDerived().RebuildObjCForCollectionStmt(S->
getForLoc(),
7388 template <
typename Derived>
7394 getDerived().TransformType(ExceptionDecl->getTypeSourceInfo());
7398 Var = getDerived().RebuildExceptionDecl(
7399 ExceptionDecl, T, ExceptionDecl->getInnerLocStart(),
7400 ExceptionDecl->getLocation(), ExceptionDecl->getIdentifier());
7410 if (!getDerived().AlwaysRebuild() && !Var &&
7414 return getDerived().RebuildCXXCatchStmt(S->
getCatchLoc(), Var, Handler.
get());
7417 template <
typename Derived>
7425 bool HandlerChanged =
false;
7432 HandlerChanged = HandlerChanged || Handler.
get() != S->
getHandler(I);
7433 Handlers.push_back(Handler.
getAs<
Stmt>());
7436 if (!getDerived().AlwaysRebuild() && TryBlock.
get() == S->
getTryBlock() &&
7440 return getDerived().RebuildCXXTryStmt(S->
getTryLoc(), TryBlock.
get(),
7444 template<
typename Derived>
7467 Cond = SemaRef.CheckBooleanCondition(S->
getColonLoc(), Cond.
get());
7471 Cond = SemaRef.MaybeCreateExprWithCleanups(Cond.
get());
7477 Inc = SemaRef.MaybeCreateExprWithCleanups(Inc.
get());
7484 if (getDerived().AlwaysRebuild() ||
7492 NewStmt = getDerived().RebuildCXXForRangeStmt(S->
getForLoc(),
7497 Inc.
get(), LoopVar.
get(),
7510 NewStmt = getDerived().RebuildCXXForRangeStmt(S->
getForLoc(),
7515 Inc.
get(), LoopVar.
get(),
7521 if (NewStmt.
get() == S)
7524 return FinishCXXForRangeStmt(NewStmt.
get(), Body.
get());
7527 template<
typename Derived>
7543 NameInfo = getDerived().TransformDeclarationNameInfo(NameInfo);
7549 if (!getDerived().AlwaysRebuild() &&
7556 SS.
Adopt(QualifierLoc);
7557 bool Dependent =
false;
7558 switch (getSema().CheckMicrosoftIfExistsSymbol(
nullptr, SS, NameInfo)) {
7589 return getDerived().RebuildMSDependentExistsStmt(S->
getKeywordLoc(),
7596 template<
typename Derived>
7616 return new (SemaRef.getASTContext())
7618 SemaRef.getASTContext().PseudoObjectTy,
VK_LValue,
7622 template <
typename Derived>
7626 if (BaseRes.isInvalid())
7628 auto IdxRes = getDerived().TransformExpr(E->
getIdx());
7629 if (IdxRes.isInvalid())
7632 if (!getDerived().AlwaysRebuild() &&
7633 BaseRes.get() == E->
getBase() &&
7634 IdxRes.get() == E->
getIdx())
7637 return getDerived().RebuildArraySubscriptExpr(
7641 template <
typename Derived>
7651 if (!getDerived().AlwaysRebuild() && TryBlock.
get() == S->
getTryBlock() &&
7656 TryBlock.
get(), Handler.
get());
7659 template <
typename Derived>
7665 return getDerived().RebuildSEHFinallyStmt(S->
getFinallyLoc(), Block.
get());
7668 template <
typename Derived>
7678 return getDerived().RebuildSEHExceptStmt(S->
getExceptLoc(), FilterExpr.
get(),
7682 template <
typename Derived>
7684 if (isa<SEHFinallyStmt>(Handler))
7685 return getDerived().TransformSEHFinallyStmt(cast<SEHFinallyStmt>(Handler));
7687 return getDerived().TransformSEHExceptStmt(cast<SEHExceptStmt>(Handler));
7690 template<
typename Derived>
7699 template <
typename Derived>
7706 TClauses.reserve(Clauses.size());
7710 getDerived().getSema().StartOpenMPClause((*I)->getClauseKind());
7711 OMPClause *Clause = getDerived().TransformOMPClause(*I);
7712 getDerived().getSema().EndOpenMPClause();
7714 TClauses.push_back(Clause);
7716 TClauses.push_back(
nullptr);
7727 Body = getDerived().TransformStmt(CS);
7730 getDerived().getSema().ActOnOpenMPRegionEnd(Body, TClauses);
7735 if (TClauses.size() != Clauses.size()) {
7742 DirName = cast<OMPCriticalDirective>(D)->getDirectiveName();
7743 DirName = getDerived().TransformDeclarationNameInfo(DirName);
7747 CancelRegion = cast<OMPCancellationPointDirective>(D)->getCancelRegion();
7749 CancelRegion = cast<OMPCancelDirective>(D)->getCancelRegion();
7752 return getDerived().RebuildOMPExecutableDirective(
7757 template <
typename Derived>
7761 getDerived().getSema().StartOpenMPDSABlock(OMPD_parallel, DirName,
nullptr,
7763 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7764 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7768 template <
typename Derived>
7772 getDerived().getSema().StartOpenMPDSABlock(OMPD_simd, DirName,
nullptr,
7774 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7775 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7779 template <
typename Derived>
7783 getDerived().getSema().StartOpenMPDSABlock(OMPD_for, DirName,
nullptr,
7785 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7786 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7790 template <
typename Derived>
7794 getDerived().getSema().StartOpenMPDSABlock(OMPD_for_simd, DirName,
nullptr,
7796 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7797 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7801 template <
typename Derived>
7805 getDerived().getSema().StartOpenMPDSABlock(OMPD_sections, DirName,
nullptr,
7807 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7808 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7812 template <
typename Derived>
7816 getDerived().getSema().StartOpenMPDSABlock(OMPD_section, DirName,
nullptr,
7818 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7819 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7823 template <
typename Derived>
7827 getDerived().getSema().StartOpenMPDSABlock(OMPD_single, DirName,
nullptr,
7829 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7830 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7834 template <
typename Derived>
7838 getDerived().getSema().StartOpenMPDSABlock(OMPD_master, DirName,
nullptr,
7840 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7841 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7845 template <
typename Derived>
7850 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7851 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7855 template <
typename Derived>
7859 getDerived().getSema().StartOpenMPDSABlock(OMPD_parallel_for, DirName,
7861 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7862 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7866 template <
typename Derived>
7870 getDerived().getSema().StartOpenMPDSABlock(OMPD_parallel_for_simd, DirName,
7872 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7873 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7877 template <
typename Derived>
7881 getDerived().getSema().StartOpenMPDSABlock(OMPD_parallel_sections, DirName,
7883 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7884 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7888 template <
typename Derived>
7892 getDerived().getSema().StartOpenMPDSABlock(OMPD_task, DirName,
nullptr,
7894 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7895 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7899 template <
typename Derived>
7903 getDerived().getSema().StartOpenMPDSABlock(OMPD_taskyield, DirName,
nullptr,
7905 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7906 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7910 template <
typename Derived>
7914 getDerived().getSema().StartOpenMPDSABlock(OMPD_barrier, DirName,
nullptr,
7916 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7917 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7921 template <
typename Derived>
7925 getDerived().getSema().StartOpenMPDSABlock(OMPD_taskwait, DirName,
nullptr,
7927 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7928 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7932 template <
typename Derived>
7936 getDerived().getSema().StartOpenMPDSABlock(OMPD_taskgroup, DirName,
nullptr,
7938 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7939 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7943 template <
typename Derived>
7947 getDerived().getSema().StartOpenMPDSABlock(OMPD_flush, DirName,
nullptr,
7949 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7950 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7954 template <
typename Derived>
7958 getDerived().getSema().StartOpenMPDSABlock(OMPD_ordered, DirName,
nullptr,
7960 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7961 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7965 template <
typename Derived>
7969 getDerived().getSema().StartOpenMPDSABlock(OMPD_atomic, DirName,
nullptr,
7971 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7972 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7976 template <
typename Derived>
7980 getDerived().getSema().StartOpenMPDSABlock(OMPD_target, DirName,
nullptr,
7982 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7983 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7987 template <
typename Derived>
7991 getDerived().getSema().StartOpenMPDSABlock(OMPD_target_data, DirName,
nullptr,
7993 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
7994 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
7998 template <
typename Derived>
8002 getDerived().getSema().StartOpenMPDSABlock(OMPD_target_enter_data, DirName,
8004 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8005 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8009 template <
typename Derived>
8013 getDerived().getSema().StartOpenMPDSABlock(OMPD_target_exit_data, DirName,
8015 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8016 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8020 template <
typename Derived>
8024 getDerived().getSema().StartOpenMPDSABlock(OMPD_target_parallel, DirName,
8026 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8027 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8031 template <
typename Derived>
8035 getDerived().getSema().StartOpenMPDSABlock(OMPD_target_parallel_for, DirName,
8037 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8038 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8042 template <
typename Derived>
8046 getDerived().getSema().StartOpenMPDSABlock(OMPD_target_update, DirName,
8048 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8049 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8053 template <
typename Derived>
8057 getDerived().getSema().StartOpenMPDSABlock(OMPD_teams, DirName,
nullptr,
8059 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8060 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8064 template <
typename Derived>
8068 getDerived().getSema().StartOpenMPDSABlock(OMPD_cancellation_point, DirName,
8070 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8071 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8075 template <
typename Derived>
8079 getDerived().getSema().StartOpenMPDSABlock(OMPD_cancel, DirName,
nullptr,
8081 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8082 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8086 template <
typename Derived>
8090 getDerived().getSema().StartOpenMPDSABlock(OMPD_taskloop, DirName,
nullptr,
8092 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8093 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8097 template <
typename Derived>
8101 getDerived().getSema().StartOpenMPDSABlock(OMPD_taskloop_simd, DirName,
8103 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8104 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8108 template <
typename Derived>
8112 getDerived().getSema().StartOpenMPDSABlock(OMPD_distribute, DirName,
nullptr,
8114 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8115 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8119 template <
typename Derived>
8123 getDerived().getSema().StartOpenMPDSABlock(
8124 OMPD_distribute_parallel_for, DirName,
nullptr, D->
getBeginLoc());
8125 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8126 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8130 template <
typename Derived>
8135 getDerived().getSema().StartOpenMPDSABlock(
8136 OMPD_distribute_parallel_for_simd, DirName,
nullptr, D->
getBeginLoc());
8137 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8138 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8142 template <
typename Derived>
8146 getDerived().getSema().StartOpenMPDSABlock(OMPD_distribute_simd, DirName,
8148 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8149 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8153 template <
typename Derived>
8157 getDerived().getSema().StartOpenMPDSABlock(
8158 OMPD_target_parallel_for_simd, DirName,
nullptr, D->
getBeginLoc());
8159 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8160 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8164 template <
typename Derived>
8168 getDerived().getSema().StartOpenMPDSABlock(OMPD_target_simd, DirName,
nullptr,
8170 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8171 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8175 template <
typename Derived>
8179 getDerived().getSema().StartOpenMPDSABlock(OMPD_teams_distribute, DirName,
8181 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8182 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8186 template <
typename Derived>
8190 getDerived().getSema().StartOpenMPDSABlock(
8191 OMPD_teams_distribute_simd, DirName,
nullptr, D->
getBeginLoc());
8192 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8193 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8197 template <
typename Derived>
8201 getDerived().getSema().StartOpenMPDSABlock(
8202 OMPD_teams_distribute_parallel_for_simd, DirName,
nullptr,
8204 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8205 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8209 template <
typename Derived>
8213 getDerived().getSema().StartOpenMPDSABlock(
8214 OMPD_teams_distribute_parallel_for, DirName,
nullptr, D->
getBeginLoc());
8215 StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
8216 getDerived().getSema().EndOpenMPDSABlock(Res.
get());
8220 template <
typename Derived>
8224 getDerived().getSema().StartOpenMPDSABlock(OMPD_target_teams, DirName,
8226 auto Res = getDerived().TransformOMPExecutableDirective(D);
8227 getDerived().getSema().EndOpenMPDSABlock(Res.get());
8231 template <
typename Derived>
8235 getDerived().getSema().StartOpenMPDSABlock(
8236 OMPD_target_teams_distribute, DirName,
nullptr, D->
getBeginLoc());
8237 auto Res = getDerived().TransformOMPExecutableDirective(D);
8238 getDerived().getSema().EndOpenMPDSABlock(Res.get());
8242 template <
typename Derived>
8247 getDerived().getSema().StartOpenMPDSABlock(
8248 OMPD_target_teams_distribute_parallel_for, DirName,
nullptr,
8250 auto Res = getDerived().TransformOMPExecutableDirective(D);
8251 getDerived().getSema().EndOpenMPDSABlock(Res.get());
8255 template <
typename Derived>
8260 getDerived().getSema().StartOpenMPDSABlock(
8261 OMPD_target_teams_distribute_parallel_for_simd, DirName,
nullptr,
8263 auto Res = getDerived().TransformOMPExecutableDirective(D);
8264 getDerived().getSema().EndOpenMPDSABlock(Res.get());
8268 template <
typename Derived>
8273 getDerived().getSema().StartOpenMPDSABlock(
8274 OMPD_target_teams_distribute_simd, DirName,
nullptr, D->
getBeginLoc());
8275 auto Res = getDerived().TransformOMPExecutableDirective(D);
8276 getDerived().getSema().EndOpenMPDSABlock(Res.get());
8284 template <
typename Derived>
8289 return getDerived().RebuildOMPIfClause(
8294 template <
typename Derived>
8299 return getDerived().RebuildOMPFinalClause(Cond.
get(), C->
getBeginLoc(),
8303 template <
typename Derived>
8309 return getDerived().RebuildOMPNumThreadsClause(
8313 template <
typename Derived>
8319 return getDerived().RebuildOMPSafelenClause(
8323 template <
typename Derived>
8329 return getDerived().RebuildOMPSimdlenClause(
8333 template <
typename Derived>
8339 return getDerived().RebuildOMPCollapseClause(
8343 template <
typename Derived>
8351 template <
typename Derived>
8359 template <
typename Derived>
8365 return getDerived().RebuildOMPScheduleClause(
8372 template <
typename Derived>
8377 E = getDerived().TransformExpr(Num);
8385 template <
typename Derived>
8392 template <
typename Derived>
8399 template <
typename Derived>
8406 template <
typename Derived>
8412 template <
typename Derived>
8418 template <
typename Derived>
8425 template <
typename Derived>
8432 template <
typename Derived>
8439 template <
typename Derived>
8446 template <
typename Derived>
8452 template <
typename Derived>
8459 template <
typename Derived>
8462 llvm_unreachable(
"unified_address clause cannot appear in dependent context");
8465 template <
typename Derived>
8469 "unified_shared_memory clause cannot appear in dependent context");
8472 template <
typename Derived>
8475 llvm_unreachable(
"reverse_offload clause cannot appear in dependent context");
8478 template <
typename Derived>
8482 "dynamic_allocators clause cannot appear in dependent context");
8485 template <
typename Derived>
8489 "atomic_default_mem_order clause cannot appear in dependent context");
8492 template <
typename Derived>
8498 ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
8501 Vars.push_back(EVar.
get());
8503 return getDerived().RebuildOMPPrivateClause(
8507 template <
typename Derived>
8513 ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
8516 Vars.push_back(EVar.
get());
8518 return getDerived().RebuildOMPFirstprivateClause(
8522 template <
typename Derived>
8528 ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
8531 Vars.push_back(EVar.
get());
8533 return getDerived().RebuildOMPLastprivateClause(
8537 template <
typename Derived>
8543 ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
8546 Vars.push_back(EVar.
get());
8548 return getDerived().RebuildOMPSharedClause(Vars, C->
getBeginLoc(),
8552 template <
typename Derived>
8558 ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
8561 Vars.push_back(EVar.
get());
8568 NameInfo = getDerived().TransformDeclarationNameInfo(NameInfo);
8578 auto *ULE = cast<UnresolvedLookupExpr>(E);
8580 for (
auto *D : ULE->decls()) {
8582 cast<NamedDecl>(getDerived().TransformDecl(E->
getExprLoc(), D));
8583 Decls.addDecl(InstD, InstD->
getAccess());
8585 UnresolvedReductions.push_back(
8587 SemaRef.Context,
nullptr,
8589 NameInfo,
true, ULE->isOverloaded(),
8590 Decls.begin(), Decls.end()));
8592 UnresolvedReductions.push_back(
nullptr);
8594 return getDerived().RebuildOMPReductionClause(
8596 C->
getEndLoc(), ReductionIdScopeSpec, NameInfo, UnresolvedReductions);
8599 template <
typename Derived>
8605 ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
8608 Vars.push_back(EVar.
get());
8615 NameInfo = getDerived().TransformDeclarationNameInfo(NameInfo);
8625 auto *ULE = cast<UnresolvedLookupExpr>(E);
8627 for (
auto *D : ULE->decls()) {
8629 cast<NamedDecl>(getDerived().TransformDecl(E->
getExprLoc(), D));
8630 Decls.addDecl(InstD, InstD->
getAccess());
8633 SemaRef.Context,
nullptr,
8635 true, ULE->isOverloaded(), Decls.begin(), Decls.end()));
8637 UnresolvedReductions.push_back(
nullptr);
8639 return getDerived().RebuildOMPTaskReductionClause(
8641 C->
getEndLoc(), ReductionIdScopeSpec, NameInfo, UnresolvedReductions);
8644 template <
typename Derived>
8650 ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
8653 Vars.push_back(EVar.
get());
8660 NameInfo = getDerived().TransformDeclarationNameInfo(NameInfo);
8670 auto *ULE = cast<UnresolvedLookupExpr>(E);
8672 for (
auto *D : ULE->decls()) {
8674 cast<NamedDecl>(getDerived().TransformDecl(E->
getExprLoc(), D));
8675 Decls.addDecl(InstD, InstD->
getAccess());
8678 SemaRef.Context,
nullptr,
8680 true, ULE->isOverloaded(), Decls.begin(), Decls.end()));
8682 UnresolvedReductions.push_back(
nullptr);
8684 return getDerived().RebuildOMPInReductionClause(
8686 C->
getEndLoc(), ReductionIdScopeSpec, NameInfo, UnresolvedReductions);
8689 template <
typename Derived>
8695 ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
8698 Vars.push_back(EVar.
get());
8703 return getDerived().RebuildOMPLinearClause(
8705 C->getModifierLoc(), C->getColonLoc(), C->
getEndLoc());
8708 template <
typename Derived>
8712 Vars.reserve(C->varlist_size());
8713 for (
auto *VE : C->varlists()) {
8714 ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
8717 Vars.push_back(EVar.
get());
8722 return getDerived().RebuildOMPAlignedClause(
8723 Vars, Alignment.
get(), C->getBeginLoc(), C->getLParenLoc(),
8727 template <
typename Derived>
8731 Vars.reserve(C->varlist_size());
8732 for (
auto *VE : C->varlists()) {
8733 ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
8736 Vars.push_back(EVar.
get());
8738 return getDerived().RebuildOMPCopyinClause(Vars, C->getBeginLoc(),
8739 C->getLParenLoc(), C->getEndLoc());
8742 template <
typename Derived>
8746 Vars.reserve(C->varlist_size());
8747 for (
auto *VE : C->varlists()) {
8748 ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
8751 Vars.push_back(EVar.
get());
8753 return getDerived().RebuildOMPCopyprivateClause(
8754 Vars, C->getBeginLoc(), C->getLParenLoc(), C->getEndLoc());
8757 template <
typename Derived>
8760 Vars.reserve(C->varlist_size());
8761 for (
auto *VE : C->varlists()) {
8762 ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
8765 Vars.push_back(EVar.
get());
8767 return getDerived().RebuildOMPFlushClause(Vars, C->getBeginLoc(),
8768 C->getLParenLoc(), C->getEndLoc());
8771 template <
typename Derived>
8775 Vars.reserve(C->varlist_size());
8776 for (
auto *VE : C->varlists()) {
8777 ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
8780 Vars.push_back(EVar.
get());
8782 return getDerived().RebuildOMPDependClause(
8784 C->getBeginLoc(), C->getLParenLoc(), C->getEndLoc());
8787 template <
typename Derived>
8793 return getDerived().RebuildOMPDeviceClause(E.
get(), C->getBeginLoc(),
8797 template <
typename Derived>
8800 Vars.reserve(C->varlist_size());
8801 for (
auto *VE : C->varlists()) {
8802 ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
8805 Vars.push_back(EVar.
get());
8807 return getDerived().RebuildOMPMapClause(
8810 C->getBeginLoc(), C->getLParenLoc(), C->getEndLoc());
8813 template <
typename Derived>
8819 return getDerived().RebuildOMPNumTeamsClause(
8823 template <
typename Derived>
8829 return getDerived().RebuildOMPThreadLimitClause(
8833 template <
typename Derived>
8839 return getDerived().RebuildOMPPriorityClause(
8843 template <
typename Derived>
8849 return getDerived().RebuildOMPGrainsizeClause(
8853 template <
typename Derived>
8859 return getDerived().RebuildOMPNumTasksClause(
8863 template <
typename Derived>
8868 return getDerived().RebuildOMPHintClause(E.
get(), C->getBeginLoc(),
8872 template <
typename Derived>
8878 return getDerived().RebuildOMPDistScheduleClause(
8883 template <
typename Derived>
8889 template <
typename Derived>
8892 Vars.reserve(C->varlist_size());
8893 for (
auto *VE : C->varlists()) {
8894 ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
8897 Vars.push_back(EVar.
get());
8899 return getDerived().RebuildOMPToClause(Vars, C->getBeginLoc(),
8900 C->getLParenLoc(), C->getEndLoc());
8903 template <
typename Derived>
8906 Vars.reserve(C->varlist_size());
8907 for (
auto *VE : C->varlists()) {
8908 ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
8911 Vars.push_back(EVar.
get());
8913 return getDerived().RebuildOMPFromClause(Vars, C->getBeginLoc(),
8914 C->getLParenLoc(), C->getEndLoc());
8917 template <
typename Derived>
8921 Vars.reserve(C->varlist_size());
8922 for (
auto *VE : C->varlists()) {
8923 ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
8926 Vars.push_back(EVar.
get());
8928 return getDerived().RebuildOMPUseDevicePtrClause(
8929 Vars, C->getBeginLoc(), C->getLParenLoc(), C->getEndLoc());
8932 template <
typename Derived>
8936 Vars.reserve(C->varlist_size());
8937 for (
auto *VE : C->varlists()) {
8938 ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
8941 Vars.push_back(EVar.
get());
8943 return getDerived().RebuildOMPIsDevicePtrClause(
8944 Vars, C->getBeginLoc(), C->getLParenLoc(), C->getEndLoc());
8950 template<
typename Derived>
8956 template<
typename Derived>
8962 return getDerived().RebuildPredefinedExpr(E->
getLocation(),
8966 template<
typename Derived>
8978 = cast_or_null<ValueDecl>(getDerived().TransformDecl(E->
getLocation(),
8985 NameInfo = getDerived().TransformDeclarationNameInfo(NameInfo);
8990 if (!getDerived().AlwaysRebuild() &&
8998 SemaRef.MarkDeclRefReferenced(E);
9005 TemplateArgs = &TransArgs;
9014 return getDerived().RebuildDeclRefExpr(QualifierLoc, ND, NameInfo,
9018 template<
typename Derived>
9024 template <
typename Derived>
9030 template<
typename Derived>
9036 template<
typename Derived>
9042 template<
typename Derived>
9048 template<
typename Derived>
9054 template<
typename Derived>
9058 SemaRef.MarkFunctionReferenced(E->
getBeginLoc(), FD);
9059 return SemaRef.MaybeBindToTemporary(E);
9062 template<
typename Derived>
9078 AssocTypes.push_back(AssocType);
9080 AssocTypes.push_back(
nullptr);
9086 AssocExprs.push_back(AssocExpr.
get());
9089 return getDerived().RebuildGenericSelectionExpr(E->
getGenericLoc(),
9092 ControllingExpr.
get(),
9097 template<
typename Derived>
9104 if (!getDerived().AlwaysRebuild() && SubExpr.
get() == E->
getSubExpr())
9107 return getDerived().RebuildParenExpr(SubExpr.
get(), E->
getLParen(),
9114 template<
typename Derived>
9118 return getDerived().TransformDependentScopeDeclRefExpr(DRE,
true,
nullptr);
9120 return getDerived().TransformExpr(E);
9123 template<
typename Derived>
9128 SubExpr = TransformAddressOfOperand(E->
getSubExpr());
9134 if (!getDerived().AlwaysRebuild() && SubExpr.
get() == E->
getSubExpr())
9142 template<
typename Derived>
9156 bool ExprChanged =
false;
9162 Comp.isBrackets =
true;
9168 ExprResult Index = getDerived().TransformExpr(FromIndex);
9172 ExprChanged = ExprChanged || Index.
get() != FromIndex;
9173 Comp.isBrackets =
true;
9174 Comp.U.E = Index.
get();
9180 Comp.isBrackets =
false;
9182 if (!Comp.U.IdentInfo)
9192 Components.push_back(Comp);
9196 if (!getDerived().AlwaysRebuild() &&
9202 return getDerived().RebuildOffsetOfExpr(E->
getOperatorLoc(), Type,
9206 template<
typename Derived>
9210 "opaque value expression requires transformation");
9214 template<
typename Derived>
9220 template<
typename Derived>
9229 Expr *newSyntacticForm = SemaRef.recreateSyntacticForm(E);
9230 ExprResult result = getDerived().TransformExpr(newSyntacticForm);
9236 if (result.
get()->hasPlaceholderType(BuiltinType::PseudoObject))
9237 result = SemaRef.checkPseudoObjectRValue(result.
get());
9242 template<
typename Derived>
9253 if (!getDerived().AlwaysRebuild() && OldT == NewT)
9256 return getDerived().RebuildUnaryExprOrTypeTrait(NewT, E->
getOperatorLoc(),
9274 PE ? dyn_cast<DependentScopeDeclRefExpr>(PE->getSubExpr()) :
nullptr)
9275 SubExpr = getDerived().TransformParenDependentScopeDeclRefExpr(
9276 PE, DRE,
false, &RecoveryTSI);
9281 return getDerived().RebuildUnaryExprOrTypeTrait(
9289 return getDerived().RebuildUnaryExprOrTypeTrait(SubExpr.
get(),
9295 template<
typename Derived>
9307 if (!getDerived().AlwaysRebuild() &&
9312 return getDerived().RebuildArraySubscriptExpr(
9317 template <
typename Derived>
9326 LowerBound = getDerived().TransformExpr(E->
getLowerBound());
9333 Length = getDerived().TransformExpr(E->
getLength());
9338 if (!getDerived().AlwaysRebuild() && Base.
get() == E->
getBase() &&
9342 return getDerived().RebuildOMPArraySectionExpr(
9347 template<
typename Derived>
9356 bool ArgChanged =
false;
9362 if (!getDerived().AlwaysRebuild() &&
9365 return SemaRef.MaybeBindToTemporary(E);
9370 return getDerived().RebuildCallExpr(Callee.
get(), FakeLParenLoc,
9375 template<
typename Derived>
9393 = cast_or_null<ValueDecl>(getDerived().TransformDecl(E->
getMemberLoc(),
9402 FoundDecl = cast_or_null<NamedDecl>(
9403 getDerived().TransformDecl(E->
getMemberLoc(), FoundDecl));
9408 if (!getDerived().AlwaysRebuild() &&
9417 SemaRef.MarkMemberReferenced(E);
9440 NamedDecl *FirstQualifierInScope =
nullptr;
9442 if (MemberNameInfo.
getName()) {
9443 MemberNameInfo = getDerived().TransformDeclarationNameInfo(MemberNameInfo);
9444 if (!MemberNameInfo.
getName())
9448 return getDerived().RebuildMemberExpr(Base.
get(), FakeOperatorLoc,
9456 ? &TransArgs :
nullptr),
9457 FirstQualifierInScope);
9460 template<
typename Derived>
9471 if (!getDerived().AlwaysRebuild() &&
9483 template<
typename Derived>
9487 return getDerived().TransformBinaryOperator(E);
9490 template<
typename Derived>
9504 if (!getDerived().AlwaysRebuild() &&
9509 return getDerived().RebuildConditionalOperator(commonExpr.
get(),
9516 template<
typename Derived>
9531 if (!getDerived().AlwaysRebuild() &&
9537 return getDerived().RebuildConditionalOperator(Cond.
get(),
9544 template<
typename Derived>
9552 template<
typename Derived>
9564 if (!getDerived().AlwaysRebuild() &&
9569 return getDerived().RebuildCStyleCastExpr(E->
getLParenLoc(),
9575 template<
typename Derived>
9587 if (!getDerived().AlwaysRebuild() &&
9590 return SemaRef.MaybeBindToTemporary(E);
9596 return getDerived().RebuildCompoundLiteralExpr(
9601 template<
typename Derived>
9608 if (!getDerived().AlwaysRebuild() &&
9615 return getDerived().RebuildExtVectorElementExpr(Base.
get(), FakeOperatorLoc,
9620 template<
typename Derived>
9626 bool InitChanged =
false;
9633 Inits, &InitChanged))
9636 if (!getDerived().AlwaysRebuild() && !InitChanged) {
9647 template<
typename Derived>
9659 bool ExprChanged =
false;
9661 if (D.isFieldDesignator()) {
9666 FieldDecl *Field = cast_or_null<FieldDecl>(
9667 getDerived().TransformDecl(D.getFieldLoc(), D.getField()));
9668 if (Field != D.getField())
9681 if (D.isArrayDesignator()) {
9690 ArrayExprs.push_back(Index.
get());
9694 assert(D.isArrayRangeDesignator() &&
"New kind of designator?");
9697 if (Start.isInvalid())
9707 D.getEllipsisLoc()));
9712 ArrayExprs.push_back(Start.get());
9713 ArrayExprs.push_back(End.
get());
9716 if (!getDerived().AlwaysRebuild() &&
9721 return getDerived().RebuildDesignatedInitExpr(Desig, ArrayExprs,
9728 template<
typename Derived>
9732 llvm_unreachable(
"Unexpected DesignatedInitUpdateExpr in syntactic form of " 9737 template<
typename Derived>
9741 llvm_unreachable(
"Unexpected NoInitExpr in syntactic form of initializer");
9745 template<
typename Derived>
9748 llvm_unreachable(
"Unexpected ArrayInitLoopExpr outside of initializer");
9752 template<
typename Derived>
9755 llvm_unreachable(
"Unexpected ArrayInitIndexExpr outside of initializer");
9759 template<
typename Derived>
9771 if (!getDerived().AlwaysRebuild() &&
9775 return getDerived().RebuildImplicitValueInitExpr(T);
9778 template<
typename Derived>
9789 if (!getDerived().AlwaysRebuild() &&
9798 template<
typename Derived>
9801 bool ArgumentChanged =
false;
9807 return getDerived().RebuildParenListExpr(E->
getLParenLoc(),
9817 template<
typename Derived>
9826 cast<LabelDecl>(LD));
9829 template<
typename Derived>
9832 SemaRef.ActOnStartStmtExpr();
9834 = getDerived().TransformCompoundStmt(E->
getSubStmt(),
true);
9836 SemaRef.ActOnStmtExprError();
9840 if (!getDerived().AlwaysRebuild() &&
9843 SemaRef.ActOnStmtExprError();
9844 return SemaRef.MaybeBindToTemporary(E);
9852 template<
typename Derived>
9867 if (!getDerived().AlwaysRebuild() &&
9878 template<
typename Derived>
9884 template<
typename Derived>
9891 case OO_Array_Delete:
9892 llvm_unreachable(
"new and delete operators cannot use CXXOperatorCallExpr");
9896 assert(E->
getNumArgs() >= 1 &&
"Object call is missing arguments");
9900 if (Object.isInvalid())
9905 static_cast<Expr *>(Object.get())->getEndLoc());
9913 return getDerived().RebuildCallExpr(Object.get(), FakeLParenLoc, Args,
9917 #define OVERLOADED_OPERATOR(Name,Spelling,Token,Unary,Binary,MemberOnly) \ 9919 #define OVERLOADED_OPERATOR_MULTI(Name,Spelling,Unary,Binary,MemberOnly) 9920 #include "clang/Basic/OperatorKinds.def" 9925 case OO_Conditional:
9926 llvm_unreachable(
"conditional operator is not actually overloadable");
9930 llvm_unreachable(
"not an overloaded operator?");
9939 First = getDerived().TransformAddressOfOperand(E->
getArg(0));
9941 First = getDerived().TransformExpr(E->
getArg(0));
9947 Second = getDerived().TransformExpr(E->
getArg(1));
9952 if (!getDerived().AlwaysRebuild() &&
9956 return SemaRef.MaybeBindToTemporary(E);
9961 return getDerived().RebuildCXXOperatorCallExpr(E->
getOperator(),
9968 template<
typename Derived>
9971 return getDerived().TransformCallExpr(E);
9974 template<
typename Derived>
9988 bool ArgChanged =
false;
9994 if (!getDerived().AlwaysRebuild() &&
9997 return SemaRef.MaybeBindToTemporary(E);
10002 return getDerived().RebuildCallExpr(Callee.
get(), FakeLParenLoc,
10007 template<
typename Derived>
10019 if (!getDerived().AlwaysRebuild() &&
10023 return getDerived().RebuildCXXNamedCastExpr(
10030 template<
typename Derived>
10036 template<
typename Derived>
10042 template<
typename Derived>
10049 template<
typename Derived>
10055 template<
typename Derived>
10069 if (!getDerived().AlwaysRebuild() &&
10074 return getDerived().RebuildCXXFunctionalCastExpr(Type,
10081 template<
typename Derived>
10090 if (!getDerived().AlwaysRebuild() &&
10110 if (!getDerived().AlwaysRebuild() &&
10118 template<
typename Derived>
10127 if (!getDerived().AlwaysRebuild() &&
10142 if (!getDerived().AlwaysRebuild() &&
10150 template<
typename Derived>
10156 template<
typename Derived>
10163 template<
typename Derived>
10166 QualType T = getSema().getCurrentThisType();
10168 if (!getDerived().AlwaysRebuild() && T == E->
getType()) {
10177 template<
typename Derived>
10184 if (!getDerived().AlwaysRebuild() &&
10188 return getDerived().RebuildCXXThrowExpr(E->
getThrowLoc(), SubExpr.
get(),
10192 template<
typename Derived>
10200 if (!getDerived().AlwaysRebuild() &&
10204 return getDerived().RebuildCXXDefaultArgExpr(E->
getUsedLocation(), Param);
10207 template<
typename Derived>
10210 FieldDecl *Field = cast_or_null<FieldDecl>(
10215 if (!getDerived().AlwaysRebuild() && Field == E->
getField())
10218 return getDerived().RebuildCXXDefaultInitExpr(E->
getExprLoc(), Field);
10221 template<
typename Derived>
10229 if (!getDerived().AlwaysRebuild() &&
10233 return getDerived().RebuildCXXScalarValueInitExpr(T,
10238 template<
typename Derived>
10244 if (!AllocTypeInfo)
10253 bool ArgumentChanged =
false;
10257 PlacementArgs, &ArgumentChanged))
10264 NewInit = getDerived().TransformInitializer(OldInit,
true);
10271 OperatorNew = cast_or_null<FunctionDecl>(
10279 OperatorDelete = cast_or_null<FunctionDecl>(
10281 if (!OperatorDelete)
10285 if (!getDerived().AlwaysRebuild() &&
10288 NewInit.
get() == OldInit &&
10291 !ArgumentChanged) {
10295 SemaRef.MarkFunctionReferenced(E->
getBeginLoc(), OperatorNew);
10296 if (OperatorDelete)
10297 SemaRef.MarkFunctionReferenced(E->
getBeginLoc(), OperatorDelete);
10303 CXXRecordDecl *Record = cast<CXXRecordDecl>(RecordT->getDecl());
10305 SemaRef.MarkFunctionReferenced(E->
getBeginLoc(), Destructor);
10314 if (!ArraySize.
get()) {
10320 const ArrayType *ArrayT = SemaRef.Context.getAsArrayType(AllocType);
10324 = dyn_cast<ConstantArrayType>(ArrayT)) {
10326 SemaRef.Context.getSizeType(),
10328 AllocType = ConsArrayT->getElementType();
10330 = dyn_cast<DependentSizedArrayType>(ArrayT)) {
10331 if (DepArrayT->getSizeExpr()) {
10332 ArraySize = DepArrayT->getSizeExpr();
10333 AllocType = DepArrayT->getElementType();
10338 return getDerived().RebuildCXXNewExpr(
10345 template<
typename Derived>
10355 OperatorDelete = cast_or_null<FunctionDecl>(
10357 if (!OperatorDelete)
10361 if (!getDerived().AlwaysRebuild() &&
10366 if (OperatorDelete)
10367 SemaRef.MarkFunctionReferenced(E->
getBeginLoc(), OperatorDelete);
10370 QualType Destroyed = SemaRef.Context.getBaseElementType(
10373 CXXRecordDecl *Record = cast<CXXRecordDecl>(DestroyedRec->getDecl());
10375 SemaRef.LookupDestructor(Record));
10382 return getDerived().RebuildCXXDeleteExpr(
10386 template<
typename Derived>
10395 bool MayBePseudoDestructor =
false;
10396 Base = SemaRef.ActOnStartCXXMemberReference(
nullptr, Base.
get(),
10398 E->
isArrow()? tok::arrow : tok::period,
10400 MayBePseudoDestructor);
10404 QualType ObjectType = ObjectTypePtr.get();
10406 if (QualifierLoc) {
10408 = getDerived().TransformNestedNameSpecifierLoc(QualifierLoc, ObjectType);
10413 SS.
Adopt(QualifierLoc);
10419 ObjectType,
nullptr, SS);
10420 if (!DestroyedTypeInfo)
10422 Destroyed = DestroyedTypeInfo;
10440 = SemaRef.Context.getTrivialTypeSourceInfo(SemaRef.GetTypeFromParser(T),
10447 ScopeTypeInfo = getDerived().TransformTypeInObjectScope(
10449 if (!ScopeTypeInfo)
10453 return getDerived().RebuildCXXPseudoDestructorExpr(Base.
get(),
10463 template <
typename Derived>
10468 bool AllEmptyPacks =
true;
10469 for (
auto *OldD : Old->
decls()) {
10470 Decl *InstD = getDerived().TransformDecl(Old->
getNameLoc(), OldD);
10474 if (isa<UsingShadowDecl>(OldD))
10483 NamedDecl *SingleDecl = cast<NamedDecl>(InstD);
10485 if (
auto *UPD = dyn_cast<UsingPackDecl>(InstD))
10486 Decls = UPD->expansions();
10489 for (
auto *D : Decls) {
10490 if (
auto *UD = dyn_cast<UsingDecl>(D)) {
10491 for (
auto *SD : UD->shadows())
10498 AllEmptyPacks &= Decls.empty();
10507 if (AllEmptyPacks && !RequiresADL) {
10508 getSema().Diag(Old->
getNameLoc(), diag::err_using_pack_expansion_empty)
10509 << isa<UnresolvedMemberExpr>(Old) << Old->
getName();
10519 template<
typename Derived>
10527 if (TransformOverloadExprDecls(Old, Old->
requiresADL(), R))
10534 = getDerived().TransformNestedNameSpecifierLoc(Old->
getQualifierLoc());
10538 SS.
Adopt(QualifierLoc);
10543 = cast_or_null<CXXRecordDecl>(getDerived().TransformDecl(
10546 if (!NamingClass) {
10551 R.setNamingClass(NamingClass);
10564 return SemaRef.BuildPossibleImplicitMemberExpr(SS, TemplateKWLoc, R,
10569 return getDerived().RebuildDeclarationNameExpr(SS, R, Old->
requiresADL());
10583 return getDerived().RebuildTemplateIdExpr(SS, TemplateKWLoc, R,
10587 template<
typename Derived>
10590 bool ArgChanged =
false;
10592 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I) {
10598 QualType To = getDerived().TransformType(TLB, FromTL);
10603 Args.push_back(From);
10617 SemaRef.collectUnexpandedParameterPacks(PatternTL, Unexpanded);
10621 bool Expand =
true;
10622 bool RetainExpansion =
false;
10626 if (getDerived().TryExpandParameterPacks(ExpansionTL.
getEllipsisLoc(),
10627 PatternTL.getSourceRange(),
10629 Expand, RetainExpansion,
10642 QualType To = getDerived().TransformType(TLB, PatternTL);
10646 To = getDerived().RebuildPackExpansionType(To,
10647 PatternTL.getSourceRange(),
10662 for (
unsigned I = 0; I != *NumExpansions; ++I) {
10665 TLB.
reserve(PatternTL.getFullDataSize());
10666 QualType To = getDerived().TransformType(TLB, PatternTL);
10671 To = getDerived().RebuildPackExpansionType(To,
10672 PatternTL.getSourceRange(),
10686 if (!RetainExpansion)
10691 ForgetPartiallySubstitutedPackRAII Forget(getDerived());
10696 QualType To = getDerived().TransformType(TLB, PatternTL);
10700 To = getDerived().RebuildPackExpansionType(To,
10701 PatternTL.getSourceRange(),
10713 if (!getDerived().AlwaysRebuild() && !ArgChanged)
10720 template<
typename Derived>
10727 if (!getDerived().AlwaysRebuild() &&
10747 template<
typename Derived>
10766 template <
typename Derived>
10770 ExprResult NewDRE = getDerived().TransformDependentScopeDeclRefExpr(
10771 DRE, AddrTaken, RecoveryTSI);
10778 if (!getDerived().AlwaysRebuild() && NewDRE.
get() == DRE)
10780 return getDerived().RebuildParenExpr(NewDRE.
get(), PE->
getLParen(),
10784 template <
typename Derived>
10787 return TransformDependentScopeDeclRefExpr(E,
false,
10791 template<
typename Derived>
10795 bool IsAddressOfOperand,
10799 = getDerived().TransformNestedNameSpecifierLoc(E->
getQualifierLoc());
10809 = getDerived().TransformDeclarationNameInfo(E->
getNameInfo());
10814 if (!getDerived().AlwaysRebuild() &&
10821 return getDerived().RebuildDependentScopeDeclRefExpr(
10822 QualifierLoc, TemplateKWLoc, NameInfo,
nullptr,
10823 IsAddressOfOperand, RecoveryTSI);
10832 return getDerived().RebuildDependentScopeDeclRefExpr(
10833 QualifierLoc, TemplateKWLoc, NameInfo, &TransArgs, IsAddressOfOperand,
10837 template<
typename Derived>
10845 (!getDerived().DropCallArgument(E->
getArg(0))) &&
10860 bool ArgumentChanged =
false;
10871 if (!getDerived().AlwaysRebuild() &&
10874 !ArgumentChanged) {
10877 SemaRef.MarkFunctionReferenced(E->
getBeginLoc(), Constructor);
10881 return getDerived().RebuildCXXConstructExpr(
10888 template<
typename Derived>
10900 if (!getDerived().AlwaysRebuild() &&
10905 SemaRef.MarkFunctionReferenced(E->
getBeginLoc(), Constructor);
10909 return getDerived().RebuildCXXInheritedCtorInitExpr(
10918 template<
typename Derived>
10929 template<
typename Derived>
10935 template<
typename Derived>
10949 bool ArgumentChanged =
false;
10961 if (!getDerived().AlwaysRebuild() &&
10964 !ArgumentChanged) {
10966 SemaRef.MarkFunctionReferenced(E->
getBeginLoc(), Constructor);
10967 return SemaRef.MaybeBindToTemporary(E);
10973 return getDerived().RebuildCXXTemporaryObjectExpr(
10978 template<
typename Derived>
10983 typedef std::pair<ExprResult, QualType> InitCaptureInfoTy;
10994 ExprResult NewExprInitResult = getDerived().TransformInitializer(
10995 C->getCapturedVar()->getInit(),
11000 Expr *NewExprInit = NewExprInitResult.
get();
11002 VarDecl *OldVD = C->getCapturedVar();
11004 getSema().buildLambdaInitCaptureInitialization(
11007 C->getCapturedVar()->getInitStyle() !=
VarDecl::CInit, NewExprInit);
11008 NewExprInitResult = NewExprInit;
11010 std::make_pair(NewExprInitResult, NewInitCaptureType);
11015 auto TPL = getDerived().TransformTemplateParameterList(
11031 QualType NewCallOpType = TransformFunctionProtoType(
11032 NewCallOpTLBuilder, OldCallOpFPTL,
nullptr,
Qualifiers(),
11035 ExceptionStorage, Changed);
11037 if (NewCallOpType.
isNull())
11039 NewCallOpTSI = NewCallOpTLBuilder.getTypeSourceInfo(getSema().Context,
11056 CXXMethodDecl *NewCallOperator = getSema().startLambdaDefinition(
11064 for (
unsigned I = 0, NumParams = NewCallOperator->
getNumParams();
11065 I != NumParams; ++I) {
11067 if (
P->hasUninstantiatedDefaultArg()) {
11073 P->setDefaultArg(R.
get());
11078 getDerived().transformedLocalDecl(E->
getCallOperator(), NewCallOperator);
11085 getSema().buildLambdaScope(LSI, NewCallOperator,
11093 bool Invalid =
false;
11096 bool FinishedExplicitCaptures =
false;
11102 if (!FinishedExplicitCaptures && C->isImplicit()) {
11103 getSema().finishLambdaExplicitCaptures(LSI);
11104 FinishedExplicitCaptures =
true;
11108 if (C->capturesThis()) {
11109 getSema().CheckCXXThisCapture(C->getLocation(), C->isExplicit(),
11116 if (C->capturesVLAType())
11121 InitCaptureInfoTy InitExprTypePair =
11124 QualType InitQualType = InitExprTypePair.second;
11129 VarDecl *OldVD = C->getCapturedVar();
11130 VarDecl *NewVD = getSema().createLambdaInitCaptureVarDecl(
11136 getDerived().transformedLocalDecl(OldVD, NewVD);
11138 getSema().buildInitCaptureField(LSI, NewVD);
11142 assert(C->capturesVariable() &&
"unexpected kind of lambda capture");
11151 if (C->isPackExpansion()) {
11153 bool ShouldExpand =
false;
11154 bool RetainExpansion =
false;
11156 if (getDerived().TryExpandParameterPacks(C->getEllipsisLoc(),
11159 ShouldExpand, RetainExpansion,
11165 if (ShouldExpand) {
11169 VarDecl *Pack = C->getCapturedVar();
11170 for (
unsigned I = 0; I != *NumExpansions; ++I) {
11173 = cast_or_null<VarDecl>(getDerived().TransformDecl(C->getLocation(),
11175 if (!CapturedVar) {
11181 getSema().tryCaptureVariable(CapturedVar, C->getLocation(),
Kind);
11189 EllipsisLoc = C->getEllipsisLoc();
11194 = cast_or_null<VarDecl>(getDerived().TransformDecl(C->getLocation(),
11195 C->getCapturedVar()));
11202 getSema().tryCaptureVariable(CapturedVar, C->getLocation(),
Kind,
11205 if (!FinishedExplicitCaptures)
11206 getSema().finishLambdaExplicitCaptures(LSI);
11210 getSema().PushExpressionEvaluationContext(
11221 SavedContext.
pop();
11222 getSema().ActOnLambdaError(E->
getBeginLoc(),
nullptr,
11230 auto LSICopy = *LSI;
11231 getSema().ActOnFinishFunctionBody(NewCallOperator, Body.
get(),
11233 SavedContext.
pop();
11235 return getSema().BuildLambdaExpr(E->
getBeginLoc(), Body.
get()->getEndLoc(),
11239 template<
typename Derived>
11248 bool ArgumentChanged =
false;
11260 if (!getDerived().AlwaysRebuild() &&
11266 return getDerived().RebuildCXXUnresolvedConstructExpr(
11270 template<
typename Derived>
11281 Base = getDerived().TransformExpr(OldBase);
11287 bool MayBePseudoDestructor =
false;
11288 Base = SemaRef.ActOnStartCXXMemberReference(
nullptr, Base.
get(),
11290 E->
isArrow()? tok::arrow : tok::period,
11292 MayBePseudoDestructor);
11296 ObjectType = ObjectTy.get();
11297 BaseType = ((
Expr*) Base.
get())->getType();
11300 BaseType = getDerived().TransformType(E->
getBaseType());
11307 = getDerived().TransformFirstQualifierInScope(
11316 FirstQualifierInScope);
11335 if (!getDerived().AlwaysRebuild() &&
11336 Base.
get() == OldBase &&
11343 return getDerived().RebuildCXXDependentScopeMemberExpr(Base.
get(),
11349 FirstQualifierInScope,
11360 return getDerived().RebuildCXXDependentScopeMemberExpr(Base.
get(),
11366 FirstQualifierInScope,
11371 template<
typename Derived>
11378 Base = getDerived().TransformExpr(Old->
getBase());
11381 Base = getSema().PerformMemberExprBaseConversion(Base.
get(),
11385 BaseType = Base.
get()->getType();
11387 BaseType = getDerived().TransformType(Old->
getBaseType());
11393 = getDerived().TransformNestedNameSpecifierLoc(Old->
getQualifierLoc());
11404 if (TransformOverloadExprDecls(Old,
false, R))
11410 = cast_or_null<CXXRecordDecl>(getDerived().TransformDecl(
11416 R.setNamingClass(NamingClass);
11433 NamedDecl *FirstQualifierInScope =
nullptr;
11435 return getDerived().RebuildUnresolvedMemberExpr(Base.
get(),
11441 FirstQualifierInScope,
11444 ? &TransArgs :
nullptr));
11447 template<
typename Derived>
11456 if (!getDerived().AlwaysRebuild() && SubExpr.
get() == E->
getOperand())
11462 template<
typename Derived>
11469 if (!getDerived().AlwaysRebuild() && Pattern.
get() == E->
getPattern())
11476 template<
typename Derived>
11495 bool ShouldExpand =
false;
11496 bool RetainExpansion =
false;
11500 ShouldExpand, RetainExpansion,
11506 if (ShouldExpand) {
11508 if (
auto *TTPD = dyn_cast<TemplateTypeParmDecl>(Pack)) {
11509 ArgStorage = getSema().Context.getPackExpansionType(
11510 getSema().Context.getTypeDeclType(TTPD), None);
11511 }
else if (
auto *TTPD = dyn_cast<TemplateTemplateParmDecl>(Pack)) {
11514 auto *VD = cast<ValueDecl>(Pack);
11515 ExprResult DRE = getSema().BuildDeclRefExpr(
11516 VD, VD->getType().getNonLValueExprType(getSema().Context),
11519 if (DRE.isInvalid())
11522 getSema().Context.DependentTy, DRE.get(), E->
getPackLoc(), None);
11524 PackArgs = ArgStorage;
11529 if (!PackArgs.size()) {
11530 auto *Pack = cast_or_null<NamedDecl>(
11534 return getDerived().RebuildSizeOfPackExpr(E->
getOperatorLoc(), Pack,
11542 if (!Arg.isPackExpansion()) {
11543 Result = *Result + 1;
11548 InventTemplateArgumentLoc(Arg, ArgLoc);
11554 getSema().getTemplateArgumentPackExpansionPattern(ArgLoc, Ellipsis,
11555 OrigNumExpansions);
11560 if (getDerived().TransformTemplateArgument(Pattern, OutPattern,
11566 getSema().getFullyPackExpandedSize(OutPattern.
getArgument());
11567 if (!NumExpansions) {
11574 Result = *Result + *NumExpansions;
11590 if (TransformTemplateArguments(PackLocIterator(*
this, PackArgs.begin()),
11591 PackLocIterator(*
this, PackArgs.end()),
11592 TransformedPackArgs,
true))
11599 bool PartialSubstitution =
false;
11600 for (
auto &Loc : TransformedPackArgs.arguments()) {
11601 Args.push_back(Loc.getArgument());
11602 if (Loc.getArgument().isPackExpansion())
11603 PartialSubstitution =
true;
11606 if (PartialSubstitution)
11613 Args.size(), None);
11616 template<
typename Derived>
11624 template<
typename Derived>
11632 template<
typename Derived>
11639 template<
typename Derived>
11646 template<
typename Derived>
11652 getSema().collectUnexpandedParameterPacks(Pattern, Unexpanded);
11653 assert(!Unexpanded.empty() &&
"Pack expansion without parameter packs?");
11657 bool Expand =
true;
11658 bool RetainExpansion =
false;
11663 Expand, RetainExpansion,
11682 if (!getDerived().AlwaysRebuild() &&
11686 return getDerived().RebuildCXXFoldExpr(
11700 if (!LeftFold && RetainExpansion) {
11701 ForgetPartiallySubstitutedPackRAII Forget(getDerived());
11703 ExprResult Out = getDerived().TransformExpr(Pattern);
11707 Result = getDerived().RebuildCXXFoldExpr(
11714 for (
unsigned I = 0; I != *NumExpansions; ++I) {
11716 getSema(), LeftFold ? I : *NumExpansions - I - 1);
11717 ExprResult Out = getDerived().TransformExpr(Pattern);
11721 if (Out.
get()->containsUnexpandedParameterPack()) {
11723 Result = getDerived().RebuildCXXFoldExpr(
11729 Result = getDerived().RebuildBinaryOperator(
11731 LeftFold ? Result.
get() : Out.
get(),
11732 LeftFold ? Out.
get() : Result.
get());
11742 if (LeftFold && RetainExpansion) {
11743 ForgetPartiallySubstitutedPackRAII Forget(getDerived());
11745 ExprResult Out = getDerived().TransformExpr(Pattern);
11749 Result = getDerived().RebuildCXXFoldExpr(
11759 return getDerived().RebuildEmptyCXXFoldExpr(E->
getEllipsisLoc(),
11765 template<
typename Derived>
11772 template<
typename Derived>
11775 return SemaRef.MaybeBindToTemporary(E);
11778 template<
typename Derived>
11784 template<
typename Derived>
11791 if (!getDerived().AlwaysRebuild() &&
11798 template<
typename Derived>
11803 bool ArgChanged =
false;
11805 false, Elements, &ArgChanged))
11808 if (!getDerived().AlwaysRebuild() && !ArgChanged)
11809 return SemaRef.MaybeBindToTemporary(E);
11811 return getDerived().RebuildObjCArrayLiteral(E->
getSourceRange(),
11816 template<
typename Derived>
11822 bool ArgChanged =
false;
11829 getSema().collectUnexpandedParameterPacks(OrigElement.
Key, Unexpanded);
11830 getSema().collectUnexpandedParameterPacks(OrigElement.
Value, Unexpanded);
11831 assert(!Unexpanded.empty() &&
"Pack expansion without parameter packs?");
11835 bool Expand =
true;
11836 bool RetainExpansion =
false;
11841 if (getDerived().TryExpandParameterPacks(OrigElement.
EllipsisLoc,
11842 PatternRange, Unexpanded, Expand,
11843 RetainExpansion, NumExpansions))
11851 ExprResult Key = getDerived().TransformExpr(OrigElement.
Key);
11855 if (Key.
get() != OrigElement.
Key)
11862 if (Value.
get() != OrigElement.
Value)
11868 Elements.push_back(Expansion);
11878 for (
unsigned I = 0; I != *NumExpansions; ++I) {
11880 ExprResult Key = getDerived().TransformExpr(OrigElement.
Key);
11895 if (Key.
get()->containsUnexpandedParameterPack() ||
11896 Value.
get()->containsUnexpandedParameterPack())
11899 Elements.push_back(Element);
11909 ExprResult Key = getDerived().TransformExpr(OrigElement.
Key);
11913 if (Key.
get() != OrigElement.
Key)
11918 = getDerived().TransformExpr(OrigElement.
Value);
11922 if (Value.
get() != OrigElement.
Value)
11928 Elements.push_back(Element);
11931 if (!getDerived().AlwaysRebuild() && !ArgChanged)
11932 return SemaRef.MaybeBindToTemporary(E);
11934 return getDerived().RebuildObjCDictionaryLiteral(E->
getSourceRange(),
11938 template<
typename Derived>
11943 if (!EncodedTypeInfo)
11946 if (!getDerived().AlwaysRebuild() &&
11950 return getDerived().RebuildObjCEncodeExpr(E->
getAtLoc(),
11955 template<
typename Derived>
11965 template<
typename Derived>
11977 if (!getDerived().AlwaysRebuild() &&
11987 template <
typename Derived>
11993 template<
typename Derived>
11997 bool ArgChanged =
false;
12008 if (!ReceiverTypeInfo)
12012 if (!getDerived().AlwaysRebuild() &&
12014 return SemaRef.MaybeBindToTemporary(E);
12019 return getDerived().RebuildObjCMessageExpr(ReceiverTypeInfo,
12035 return getDerived().RebuildObjCMessageExpr(E->
getSuperLoc(),
12047 "Only class and instance messages may be instantiated");
12050 if (Receiver.isInvalid())
12054 if (!getDerived().AlwaysRebuild() &&
12056 return SemaRef.MaybeBindToTemporary(E);
12061 return getDerived().RebuildObjCMessageExpr(Receiver.get(),
12070 template<
typename Derived>
12076 template<
typename Derived>
12082 template<
typename Derived>
12093 if (!getDerived().AlwaysRebuild() &&
12097 return getDerived().RebuildObjCIvarRefExpr(Base.
get(), E->
getDecl(),
12102 template<
typename Derived>
12118 if (!getDerived().AlwaysRebuild() &&
12123 return getDerived().RebuildObjCPropertyRefExpr(Base.
get(),
12127 return getDerived().RebuildObjCPropertyRefExpr(Base.
get(),
12128 SemaRef.Context.PseudoObjectTy,
12134 template<
typename Derived>
12148 if (!getDerived().AlwaysRebuild() &&
12152 return getDerived().RebuildObjCSubscriptRefExpr(E->
getRBracket(),
12158 template<
typename Derived>
12167 if (!getDerived().AlwaysRebuild() &&
12176 template<
typename Derived>
12179 bool ArgumentChanged =
false;
12183 SubExprs, &ArgumentChanged))
12186 if (!getDerived().AlwaysRebuild() &&
12190 return getDerived().RebuildShuffleVectorExpr(E->
getBuiltinLoc(),
12195 template<
typename Derived>
12206 if (!getDerived().AlwaysRebuild() &&
12211 return getDerived().RebuildConvertVectorExpr(E->
getBuiltinLoc(),
12212 SrcExpr.
get(), Type,
12216 template<
typename Derived>
12235 if (getDerived().TransformFunctionTypeParams(
12244 getDerived().TransformType(exprFunctionType->
getReturnType());
12250 getDerived().RebuildFunctionProtoType(exprResultType, paramTypes, epi);
12254 if (!params.empty())
12272 if (!SemaRef.getDiagnostics().hasErrorOccurred()) {
12273 for (
const auto &I : oldBlock->
captures()) {
12274 VarDecl *oldCapture = I.getVariable();
12277 if (isa<ParmVarDecl>(oldCapture) &&
12278 cast<ParmVarDecl>(oldCapture)->isParameterPack())
12284 assert(blockScope->
CaptureMap.count(newCapture));
12294 template<
typename Derived>
12297 llvm_unreachable(
"Cannot transform asType expressions yet");
12300 template<
typename Derived>
12304 bool ArgumentChanged =
false;
12308 SubExprs, &ArgumentChanged))
12311 if (!getDerived().AlwaysRebuild() &&
12315 return getDerived().RebuildAtomicExpr(E->
getBuiltinLoc(), SubExprs,
12323 template<
typename Derived>
12326 return SemaRef.BuildPointerType(PointeeType, Star,
12327 getDerived().getBaseEntity());
12330 template<
typename Derived>
12333 return SemaRef.BuildBlockPointerType(PointeeType, Star,
12334 getDerived().getBaseEntity());
12337 template<
typename Derived>
12340 bool WrittenAsLValue,
12342 return SemaRef.BuildReferenceType(ReferentType, WrittenAsLValue,
12343 Sigil, getDerived().getBaseEntity());
12346 template<
typename Derived>
12351 return SemaRef.BuildMemberPointerType(PointeeType, ClassType, Sigil,
12352 getDerived().getBaseEntity());
12355 template<
typename Derived>
12362 return SemaRef.BuildObjCTypeParamType(Decl,
12363 ProtocolLAngleLoc, Protocols,
12364 ProtocolLocs, ProtocolRAngleLoc,
12368 template<
typename Derived>
12379 return SemaRef.BuildObjCObjectType(BaseType, Loc, TypeArgsLAngleLoc,
12380 TypeArgs, TypeArgsRAngleLoc,
12381 ProtocolLAngleLoc, Protocols, ProtocolLocs,
12386 template<
typename Derived>
12390 return SemaRef.Context.getObjCObjectPointerType(PointeeType);
12393 template<
typename Derived>
12397 const llvm::APInt *Size,
12399 unsigned IndexTypeQuals,
12401 if (SizeExpr || !Size)
12402 return SemaRef.BuildArrayType(ElementType, SizeMod, SizeExpr,
12403 IndexTypeQuals, BracketsRange,
12404 getDerived().getBaseEntity());
12407 SemaRef.Context.UnsignedCharTy, SemaRef.Context.UnsignedShortTy,
12408 SemaRef.Context.UnsignedIntTy, SemaRef.Context.UnsignedLongTy,
12409 SemaRef.Context.UnsignedLongLongTy, SemaRef.Context.UnsignedInt128Ty
12411 const unsigned NumTypes = llvm::array_lengthof(Types);
12413 for (
unsigned I = 0; I != NumTypes; ++I)
12414 if (Size->getBitWidth() == SemaRef.Context.getIntWidth(Types[I])) {
12415 SizeType = Types[I];
12424 return SemaRef.BuildArrayType(ElementType, SizeMod, ArraySize,
12425 IndexTypeQuals, BracketsRange,
12426 getDerived().getBaseEntity());
12429 template<
typename Derived>
12433 const llvm::APInt &Size,
12434 unsigned IndexTypeQuals,
12436 return getDerived().RebuildArrayType(ElementType, SizeMod, &Size,
nullptr,
12437 IndexTypeQuals, BracketsRange);
12440 template<
typename Derived>
12444 unsigned IndexTypeQuals,
12446 return getDerived().RebuildArrayType(ElementType, SizeMod,
nullptr,
nullptr,
12447 IndexTypeQuals, BracketsRange);
12450 template<
typename Derived>
12455 unsigned IndexTypeQuals,
12457 return getDerived().RebuildArrayType(ElementType, SizeMod,
nullptr,
12459 IndexTypeQuals, BracketsRange);
12462 template<
typename Derived>
12467 unsigned IndexTypeQuals,
12469 return getDerived().RebuildArrayType(ElementType, SizeMod,
nullptr,
12471 IndexTypeQuals, BracketsRange);
12474 template <
typename Derived>
12477 return SemaRef.BuildAddressSpaceAttr(PointeeType, AddrSpaceExpr,
12481 template <
typename Derived>
12484 unsigned NumElements,
12487 return SemaRef.Context.getVectorType(ElementType, NumElements, VecKind);
12490 template <
typename Derived>
12494 return SemaRef.BuildVectorType(ElementType, SizeExpr, AttributeLoc);
12497 template<
typename Derived>
12499 unsigned NumElements,
12501 llvm::APInt numElements(SemaRef.Context.getIntWidth(SemaRef.Context.IntTy),
12502 NumElements,
true);
12506 return SemaRef.BuildExtVectorType(ElementType, VectorSize, AttributeLoc);
12509 template<
typename Derived>
12514 return SemaRef.BuildExtVectorType(ElementType, SizeExpr, AttributeLoc);
12517 template<
typename Derived>
12522 return SemaRef.BuildFunctionType(T, ParamTypes,
12523 getDerived().getBaseLocation(),
12524 getDerived().getBaseEntity(),
12528 template<
typename Derived>
12530 return SemaRef.Context.getFunctionNoProtoType(T);
12533 template<
typename Derived>
12536 assert(D &&
"no decl found");
12541 if (
auto *UPD = dyn_cast<UsingPackDecl>(D)) {
12545 if (UPD->expansions().empty()) {
12546 getSema().Diag(Loc, diag::err_using_pack_expansion_empty)
12556 for (
auto *E : UPD->expansions()) {
12557 QualType ThisT = RebuildUnresolvedUsingType(Loc, E);
12565 assert(getSema().Context.hasSameType(ThisT, T) &&
12566 "mismatched resolved types in using pack expansion");
12568 return T.
isNull() ? FallbackT : T;
12569 }
else if (
auto *Using = dyn_cast<UsingDecl>(D)) {
12570 assert(Using->hasTypename() &&
12571 "UnresolvedUsingTypenameDecl transformed to non-typename using");
12574 assert(++Using->shadow_begin() == Using->shadow_end());
12575 Ty = cast<TypeDecl>((*Using->shadow_begin())->getTargetDecl());
12577 assert(isa<UnresolvedUsingTypenameDecl>(D) &&
12578 "UnresolvedUsingTypenameDecl transformed to non-using decl");
12579 Ty = cast<UnresolvedUsingTypenameDecl>(D);
12582 return SemaRef.Context.getTypeDeclType(Ty);
12585 template<
typename Derived>
12588 return SemaRef.BuildTypeofExprType(E, Loc);
12591 template<
typename Derived>
12593 return SemaRef.Context.getTypeOfType(Underlying);
12596 template<
typename Derived>
12599 return SemaRef.BuildDecltypeType(E, Loc);
12602 template<
typename Derived>
12606 return SemaRef.BuildUnaryTransformType(BaseType, UKind, Loc);
12609 template<
typename Derived>
12614 return SemaRef.CheckTemplateIdType(Template, TemplateNameLoc, TemplateArgs);
12617 template<
typename Derived>
12620 return SemaRef.BuildAtomicType(ValueType, KWLoc);
12623 template<
typename Derived>
12627 return isReadPipe ? SemaRef.BuildReadPipeType(ValueType, KWLoc)
12628 : SemaRef.BuildWritePipeType(ValueType, KWLoc);
12631 template<
typename Derived>
12636 return SemaRef.Context.getQualifiedTemplateName(SS.
getScopeRep(), TemplateKW,
12640 template<
typename Derived>
12648 bool AllowInjectedClassName) {
12652 getSema().ActOnDependentTemplateName(
nullptr,
12653 SS, TemplateKWLoc, TemplateName,
12656 Template, AllowInjectedClassName);
12657 return Template.
get();
12660 template<
typename Derived>
12667 bool AllowInjectedClassName) {
12670 SourceLocation SymbolLocations[3] = { NameLoc, NameLoc, NameLoc };
12673 getSema().ActOnDependentTemplateName(
nullptr,
12674 SS, TemplateKWLoc, Name,
12677 Template, AllowInjectedClassName);
12678 return Template.
get();
12681 template<
typename Derived>
12689 bool isPostIncDec = Second && (Op == OO_PlusPlus || Op == OO_MinusMinus);
12694 return SemaRef.checkPseudoObjectAssignment(
nullptr, OpLoc, Opc,
12696 ExprResult Result = SemaRef.CheckPlaceholderExpr(First);
12699 First = Result.
get();
12703 ExprResult Result = SemaRef.CheckPlaceholderExpr(Second);
12706 Second = Result.
get();
12710 if (Op == OO_Subscript) {
12713 return getSema().CreateBuiltinArraySubscriptExpr(
12715 }
else if (Op == OO_Arrow) {
12717 return SemaRef.BuildOverloadedArrowExpr(
nullptr, First, OpLoc);
12718 }
else if (Second ==
nullptr || isPostIncDec) {
12720 (Op == OO_Amp && getSema().isQualifiedMemberAccess(First))) {
12727 return getSema().CreateBuiltinUnaryOp(OpLoc, Opc, First);
12736 = SemaRef.CreateBuiltinBinOp(OpLoc, Opc, First, Second);
12750 Functions.
append(ULE->decls_begin(), ULE->decls_end());
12754 RequiresADL = ULE->requiresADL();
12759 NamedDecl *ND = cast<DeclRefExpr>(Callee)->getDecl();
12760 if (!isa<CXXMethodDecl>(ND))
12762 RequiresADL =
false;
12766 Expr *Args[2] = { First, Second };
12767 unsigned NumArgs = 1 + (Second !=
nullptr);
12770 if (NumArgs == 1 || isPostIncDec) {
12773 return SemaRef.CreateOverloadedUnaryOp(OpLoc, Opc, Functions, First,
12777 if (Op == OO_Subscript) {
12781 if (
DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Callee)) {
12792 return SemaRef.CreateOverloadedArraySubscriptExpr(LBrace, RBrace,
12798 ExprResult Result = SemaRef.CreateOverloadedBinOp(
12799 OpLoc, Opc, Functions, Args[0], Args[1], RequiresADL);
12806 template<
typename Derived>
12821 ->template getAs<RecordType>())){
12823 return SemaRef.BuildPseudoDestructorExpr(
12824 Base, OperatorLoc, isArrow ? tok::arrow : tok::period, SS, ScopeType,
12825 CCLoc, TildeLoc, Destroyed);
12829 DeclarationName Name(SemaRef.Context.DeclarationNames.getCXXDestructorName(
12830 SemaRef.Context.getCanonicalType(DestroyedType->
getType())));
12839 diag::err_expected_class_or_namespace)
12840 << ScopeType->
getType() << getSema().getLangOpts().CPlusPlus;
12848 return getSema().BuildMemberReferenceExpr(Base, BaseType,
12849 OperatorLoc, isArrow,
12857 template<
typename Derived>
12865 for (
unsigned I = 0; I < NumParams; ++I) {
12866 if (I != ContextParamPos) {
12872 Params.push_back(std::make_pair(StringRef(),
QualType()));
12875 getSema().ActOnCapturedRegionStart(Loc,
nullptr,
12884 getSema().ActOnCapturedRegionError();
12888 return getSema().ActOnCapturedRegionEnd(Body.
get());
12893 #endif // LLVM_CLANG_LIB_SEMA_TREETRANSFORM_H SourceLocation getRParenLoc() const
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
const Expr * getSubExpr() const
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
A call to an overloaded operator written using operator syntax.
The receiver is the instance of the superclass object.
Represents a single C99 designator.
SourceLocation getLoc() const
getLoc - Returns the main location of the declaration name.
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
SourceLocation getRBracLoc() const
const BlockDecl * getBlockDecl() const
This represents '#pragma omp distribute simd' composite directive.
QualType getDeducedType() const
Get the type deduced for this placeholder type, or null if it's either not been deduced or was deduce...
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.
IdentifierInfo * getInputIdentifier(unsigned i) const
This represents '#pragma omp master' directive.
Represents a type that was referred to using an elaborated type keyword, e.g., struct S...
void setScopeInfo(unsigned scopeDepth, unsigned parameterIndex)
TypeLoc getValueLoc() const
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
SourceLocation getRParenLoc() const
The null pointer literal (C++11 [lex.nullptr])
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
SourceLocation getBeginLoc() const
capture_iterator explicit_capture_end() const
Retrieve an iterator pointing past the end of the sequence of explicit lambda captures.
This represents '#pragma omp task' directive.
This represents a GCC inline-assembly statement extension.
Represents a function declaration or definition.
Represents a 'co_await' expression while the type of the promise is dependent.
Expr * getArrayIndex(const Designator &D) const
SourceLocation getForLoc() const
SourceRange getExceptionSpecRange() const
helper_expr_const_range reduction_ops() const
Name lookup found a set of overloaded functions that met the criteria.
This represents 'thread_limit' clause in the '#pragma omp ...' directive.
std::pair< llvm::PointerUnion< const TemplateTypeParmType *, NamedDecl * >, SourceLocation > UnexpandedParameterPack
Expr ** getArgs()
Retrieve the call arguments.
The receiver is an object instance.
bool hasExplicitTemplateArgs() const
Determines whether this expression had explicit template arguments.
unsigned getNumInputs() const
SourceLocation getOpLoc() const
SourceLocation getRParenLoc() const
ObjCDictionaryElement getKeyValueElement(unsigned Index) const
const TemplateArgumentLoc * getTemplateArgs() const
Retrieve the template arguments provided as part of this template-id.
const FunctionProtoType * getFunctionType() const
getFunctionType - Return the underlying function type for this block.
CompoundStmt * getBlock() const
friend bool operator==(const TemplateArgumentLocInventIterator &X, const TemplateArgumentLocInventIterator &Y)
Smart pointer class that efficiently represents Objective-C method names.
TemplateArgumentLoc reference
SourceLocation getForLoc() const
This represents clause 'copyin' in the '#pragma omp ...' directives.
const TypeClass * getTypePtr() const
PointerType - C99 6.7.5.1 - Pointer Declarators.
QualType getPointeeType() const
void MakeSuper(ASTContext &Context, CXXRecordDecl *RD, SourceLocation SuperLoc, SourceLocation ColonColonLoc)
Turns this (empty) nested-name-specifier into '__super' nested-name-specifier.
SourceLocation getUsedLocation() const
Retrieve the location where this default argument was actually used.
Represents the dependent type named by a dependently-scoped typename using declaration, e.g.
Stores the type being destroyed by a pseudo-destructor expression.
A (possibly-)qualified type.
Keeps information about an identifier in a nested-name-spec.
SourceLocation getBeginLoc() const
void MakeTrivial(ASTContext &Context, NestedNameSpecifier *Qualifier, SourceRange R)
Make a new nested-name-specifier from incomplete source-location information.
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
void setStarLoc(SourceLocation Loc)
ArrayRef< OMPClause * > clauses()
Expr * getArg(unsigned Arg)
getArg - Return the specified argument.
ObjCMethodDecl * getAtIndexMethodDecl() const
Instantiation or recovery rebuild of a for-range statement.
Selector getSelector() const
SourceRange getSourceRange() const
SourceLocation getEllipsisLoc() const
Get the location of the ... in a case statement of the form LHS ... RHS.
SourceLocation getLParen() const
Get the location of the left parentheses '('.
const Expr * getSubExpr() const
capture_iterator capture_end() const
Retrieve an iterator pointing past the end of the sequence of lambda captures.
SourceLocation getCommaLoc()
Get location of ','.
const TypeClass * getTypePtr() const
TemplateParameterList * GLTemplateParameterList
If this is a generic lambda, and the template parameter list has been created (from the AutoTemplateP...
SourceRange getSourceRange() const LLVM_READONLY
Retrieve the source range covering the entirety of this nested-name-specifier.
unsigned getNumSubExprs() const
getNumSubExprs - Return the size of the SubExprs array.
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
Ordinary name lookup, which finds ordinary names (functions, variables, typedefs, etc...
CompoundStmt * getSubStmt()
This represents 'atomic_default_mem_order' clause in the '#pragma omp requires' directive.
TemplateArgumentLoc operator*() const
bool isListInitialization() const
Determine whether this expression models list-initialization.
SourceLocation getKWLoc() const
NestedNameSpecifierLoc getTemplateQualifierLoc() const
Expr * getUnderlyingExpr() const
void setKWLoc(SourceLocation Loc)
static ConditionResult ConditionError()
const TemplateArgumentLoc * operator->() const
void setRParenLoc(SourceLocation Loc)
SourceLocation getRParenLoc() const
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...
AutoTypeKeyword
Which keyword(s) were used to create an AutoType.
bool isLeftFold() const
Does this produce a left-associated sequence of operators?
Represents a 'co_return' statement in the C++ Coroutines TS.
Stmt - This represents one statement.
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
This represents clause 'in_reduction' in the '#pragma omp task' directives.
Expr * getDimensionExpression() const
const ObjCAtFinallyStmt * getFinallyStmt() const
Retrieve the @finally statement, if any.
void setLAngleLoc(SourceLocation Loc)
void setExceptionSpecRange(SourceRange R)
CXXCatchStmt * getHandler(unsigned i)
IfStmt - This represents an if/then/else.
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
SourceLocation getOperatorLoc() const
getOperatorLoc - Return the location of the operator.
SourceLocation getRParenLoc() const
QualType getPointeeType() const
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee...
TemplateArgumentLoc const * getTemplateArgs() const
TypeLoc getValueLoc() const
ObjCMethodDecl * setAtIndexMethodDecl() const
QualType ReturnType
ReturnType - The target type of return statements in this context, or null if unknown.
StorageClass getStorageClass() const
Returns the storage class as written in the source.
unsigned getNumOutputs() const
Microsoft's '__super' specifier, stored as a CXXRecordDecl* of the class it appeared in...
bool isConstexpr() const
Whether this is a (C++11) constexpr function or constexpr constructor.
Represents a qualified type name for which the type name is dependent.
SourceLocation getEndLoc() const LLVM_READONLY
This represents '#pragma omp for simd' directive.
SourceLocation getLParenLoc() const
Returns the location of '('.
The template argument is an expression, and we've not resolved it to one of the other forms yet...
bool isRecordType() const
TemplateArgumentLoc reference
const StringLiteral * getAsmString() const
TypeSourceInfo * getTypeSourceInfo() const
SemaDiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID)
Emit a diagnostic.
Decl - This represents one declaration (or definition), e.g.
This represents 'grainsize' clause in the '#pragma omp ...' directive.
This represents '#pragma omp teams distribute parallel for' composite directive.
Stmt * getHandlerBlock() const
SourceLocation getBeginLoc() const
Returns starting location of directive kind.
ObjCMethodDecl * getImplicitPropertySetter() const
Represents the index of the current element of an array being initialized by an ArrayInitLoopExpr.
FunctionDecl * getOperatorNew() const
WrittenBuiltinSpecs & getWrittenBuiltinSpecs()
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
This represents 'if' clause in the '#pragma omp ...' directive.
QualType getDeducedTemplateSpecializationType(TemplateName Template, QualType DeducedType, bool IsDependent) const
C++17 deduced class template specialization type.
const Expr * getSubExpr() const
DeclarationNameInfo getNameInfo() const
Retrieve the name of the entity we're testing for, along with location information.
Defines the C++ template declaration subclasses.
CapturedStmt * getInnermostCapturedStmt()
Get innermost captured statement for the construct.
Represents a C++11 auto or C++14 decltype(auto) type.
SourceLocation getIdentLoc() const
Represents an attribute applied to a statement.
ParenExpr - This represents a parethesized expression, e.g.
const AstTypeMatcher< FunctionType > functionType
Matches FunctionType nodes.
bool hasQualifier() const
Determines whether this member expression actually had a C++ nested-name-specifier prior to the name ...
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies this name, if any.
Expr * getLowerBound()
Get lower bound of array section.
This represents 'priority' clause in the '#pragma omp ...' directive.
The base class of the type hierarchy.
This represents '#pragma omp target teams distribute' combined directive.
Represents Objective-C's @throw statement.
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called...
void setParams(ArrayRef< ParmVarDecl *> NewParamInfo)
reference operator*() const
const IdentifierInfo * getField() const
bool hasExplicitTemplateArgs() const
Determines whether this declaration reference was followed by an explicit template argument list...
void setTemplateKeywordLoc(SourceLocation Loc)
Represents an array type, per C99 6.7.5.2 - Array Declarators.
The template argument is a declaration that was provided for a pointer, reference, or pointer to member non-type template parameter.
Represent a C++ namespace.
SourceLocation getKeywordLoc() const
Represents a call to a C++ constructor.
SourceLocation getBeginLoc() const LLVM_READONLY
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
Wrapper for source info for typedefs.
static ExprValueKind getValueKindForType(QualType T)
getValueKindForType - Given a formal return or parameter type, give its value kind.
TypeSourceInfo * getTypeInfoAsWritten() const
getTypeInfoAsWritten - Returns the type source info for the type that this expression is casting to...
FPOptions getFPFeatures() const
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent...
TypeLoc getOriginalLoc() const
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getLParenLoc() const
Expr * getCondition() const
Returns condition.
std::input_iterator_tag iterator_category
A container of type source information.
This represents 'update' clause in the '#pragma omp atomic' directive.
SourceLocation getBeginLoc() const LLVM_READONLY
Wrapper for void* pointer.
Expr * getCondition() const
Returns condition.
SourceLocation getAttributeLoc() const
This represents '#pragma omp parallel for' directive.
MS property subscript expression.
IdentKind getIdentKind() const
SourceLocation getBeginLoc() const LLVM_READONLY
SourceLocation getGotoLoc() const
unsigned location_size() const
Retrieve the size of the data associated with source-location information.
SourceLocation getOperatorLoc() const
Determine the location of the 'sizeof' keyword.
SourceLocation getRParenLoc() const
This represents '#pragma omp target teams distribute parallel for' combined directive.
Wrapper for source info for pointers decayed from arrays and functions.
Describes the capture of a variable or of this, or of a C++1y init-capture.
Represents a C++ constructor within a class.
LLVM_ATTRIBUTE_REINITIALIZES void clear()
Clears out any current state.
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
SourceLocation getAccessorLoc() const
Expr * getAlignment()
Returns alignment.
SourceLocation getLocalBeginLoc() const
Retrieve the location of the beginning of this component of the nested-name-specifier.
Expr * getNumForLoops() const
Return the number of associated for-loops.
SourceLocation getRParenLoc() const
getRParenLoc - Return the location of final right parenthesis.
SourceLocation getEndLoc() const
Get the end source location.
SourceLocation getSecondScheduleModifierLoc() const
Get the second modifier location.
QualType getElementType() const
TemplateName getTemplateName() const
Retrieve the name of the template that we are deducing.
SourceLocation getCoawaitLoc() const
Expr * getIndexExpr(unsigned Idx)
Stmt * getExceptionHandler() const
SourceLocation getEndLoc() const
Returns ending location of directive.
SourceLocation getRParenLoc() const
Expr * getDeallocate() const
An identifier, stored as an IdentifierInfo*.
This represents '#pragma omp target exit data' directive.
void Adopt(NestedNameSpecifierLoc Other)
Adopt an existing nested-name-specifier (with source-range information).
SourceLocation getDependencyLoc() const
Get dependency type location.
void setRAngleLoc(SourceLocation Loc)
This represents 'read' clause in the '#pragma omp atomic' directive.
SourceLocation getBeginLoc() const LLVM_READONLY
SourceLocation getBeginLoc() const LLVM_READONLY
RAII object that enters a new expression evaluation context.
Represents a variable declaration or definition.
ActionResult< Stmt * > StmtResult
This represents clause 'private' in the '#pragma omp ...' directives.
SourceLocation getLParenLoc() const
QualType getBaseType() const
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
Information about one declarator, including the parsed type information and the identifier.
void removeObjCLifetime()
CompoundLiteralExpr - [C99 6.5.2.5].
This represents 'num_threads' clause in the '#pragma omp ...' directive.
Wrapper for source info for member pointers.
bool isEnumeralType() const
SourceLocation getOperatorLoc() const
Retrieve the location of the '.' or '->' operator.
Wrapper of type source information for a type with non-trivial direct qualifiers. ...
IdentifierInfo * getIdentifier() const
UnresolvedLookupExpr * getOperatorCoawaitLookup() const
const T * getAs() const
Member-template getAs<specific type>'.
bool isOverloadableType() const
Determines whether this is a type for which one can define an overloaded operator.
SourceLocation getBeginLoc() const LLVM_READONLY
Records and restores the FP_CONTRACT state on entry/exit of compound statements.
DeclContext * computeDeclContext(QualType T)
Compute the DeclContext that is associated with the given type.
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
Represents an empty template argument, e.g., one that has not been deduced.
Extra information about a function prototype.
This represents 'defaultmap' clause in the '#pragma omp ...' directive.
Stmt * getResultDecl() const
SourceLocation getStarLoc() const
Represents a C++17 deduced template specialization type.
SourceLocation getColonLoc() const
QualifiedTemplateName * getAsQualifiedTemplateName() const
Retrieve the underlying qualified template name structure, if any.
ObjCMethodDecl - Represents an instance or class method declaration.
SourceLocation getLeftLoc() const
ArrayRef< SourceLocation > getProtocolLocs() const
RAII object used to temporarily allow the C++ 'this' expression to be used, with the given qualifiers...
A namespace, stored as a NamespaceDecl*.
SourceLocation getColonLoc() const
Return the location of ':'.
DeclarationName getName() const
Gets the name looked up.
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
TypeLoc getNamedTypeLoc() const
bool isInvalidDecl() const
SourceLocation getIfLoc() const
void setAttrOperandParensRange(SourceRange range)
void setProtocolRAngleLoc(SourceLocation Loc)
Stores a list of template parameters for a TemplateDecl and its derived classes.
unsigned getContextParamPosition() const
unsigned getNumPlacementArgs() const
TypeSourceInfo * getArgumentTypeInfo() const
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
This represents implicit clause 'flush' for the '#pragma omp flush' directive.
Defines the Objective-C statement AST node classes.
SourceRange getSourceRange() const LLVM_READONLY
Retrieve the source range that covers this offsetof node.
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
SpecifierKind getKind() const
Determine what kind of nested name specifier is stored.
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 ...
This represents 'reverse_offload' clause in the '#pragma omp requires' directive. ...
TypeSourceInfo * getArg(unsigned I) const
Retrieve the Ith argument.
Expr * getAttrExprOperand() const
The attribute's expression operand, if it has one.
Represents a parameter to a function.
SourceRange getSourceRange() const LLVM_READONLY
Represents the result of substituting a type for a template type parameter.
TemplateArgumentLocContainerIterator operator++(int)
SourceLocation getRParenLoc() const
Defines the clang::Expr interface and subclasses for C++ expressions.
SourceLocation getLParenLoc() const
Returns the location of '('.
void setQualifierLoc(NestedNameSpecifierLoc QualifierLoc)
Expr * getGrainsize() const
Return safe iteration space distance.
This represents 'nogroup' clause in the '#pragma omp ...' directive.
A reasonable base class for TypeLocs that correspond to types that are written as a type-specifier...
The collection of all-type qualifiers we support.
SourceLocation getBeginLoc() const LLVM_READONLY
CXXRecordDecl * getLambdaClass() const
Retrieve the class that corresponds to the lambda.
void setTypeArgTInfo(unsigned i, TypeSourceInfo *TInfo)
SourceLocation getBuiltinLoc() const
This represents 'safelen' clause in the '#pragma omp ...' directive.
ObjCPropertyDecl * getExplicitProperty() const
bool needsExtraLocalData() const
A C++ static_cast expression (C++ [expr.static.cast]).
SourceLocation getLParenLoc() const
Returns the location of '('.
Expr * getExprOperand() const
bool canHaveNullability(bool ResultIfUnknown=true) const
Determine whether the given type can have a nullability specifier applied to it, i.e., if it is any kind of pointer type.
SourceLocation getEndLoc() const LLVM_READONLY
const Stmt * getSubStmt() const
SourceLocation getAttributeLoc() const
IdentifierInfo * getIdentifier() const
Get the identifier that names this declaration, if there is one.
Base wrapper for a particular "section" of type source info.
SourceLocation getRParenLoc() const
Retrieve the location of the closing parenthesis.
LabelStmt - Represents a label, which has a substatement.
Represents a struct/union/class.
Represents a C99 designated initializer expression.
unsigned varlist_size() const
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
TypeSourceInfo * getEncodedTypeSourceInfo() const
TypeSourceInfo * getScopeTypeInfo() const
Retrieve the scope type in a qualified pseudo-destructor expression.
SourceLocation getKeywordLoc() const
SourceLocation getLParenLoc() const
Returns the location of '('.
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...
void setLocalRangeEnd(SourceLocation L)
Name lookup results in an ambiguity; use getAmbiguityKind to figure out what kind of ambiguity we hav...
SourceLocation getTildeLoc() const
Retrieve the location of the '~'.
SourceLocation getRParenLoc() const
An element in an Objective-C dictionary literal.
This represents '#pragma omp parallel' directive.
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
SourceLocation getColonLoc() const
Gets location of ':' symbol in clause.
Represents a class type in Objective C.
SourceLocation getRParen() const
Get the location of the right parentheses ')'.
Expr * getAsExpr() const
Retrieve the template argument as an expression.
A C++ nested-name-specifier augmented with source location information.
Expr * getInit() const
Retrieve the initializer value.
Represents a dependent template name that cannot be resolved prior to template instantiation.
ArrayRef< QualType > getParamTypes() const
The results of name lookup within a DeclContext.
This represents 'simd' clause in the '#pragma omp ...' directive.
bool isObjCLifetimeType() const
Returns true if objects of this type have lifetime semantics under ARC.
TypeSourceInfo * getTypeSourceInfo() const
TypeLoc getInnerLoc() const
QualType BuildParenType(QualType T)
Build a paren type including T.
The template argument is an integral value stored in an llvm::APSInt that was provided for an integra...
void setBuiltinLoc(SourceLocation Loc)
void setArgLocInfo(unsigned i, TemplateArgumentLocInfo AI)
TemplateDecl * getAsTemplateDecl() const
Retrieve the underlying template declaration that this template name refers to, if known...
TemplateArgumentLoc value_type
TypeSourceInfo * getUnderlyingTInfo() const
bool isExplicitProperty() const
bool isSpelledAsLValue() const
SourceLocation getAmpAmpLoc() const
static SourceLocation getFromRawEncoding(unsigned Encoding)
Turn a raw encoding of a SourceLocation object into a real SourceLocation.
void setRBracketLoc(SourceLocation Loc)
TypeSourceInfo * getTypeSourceInfo(ASTContext &Context, QualType T)
Creates a TypeSourceInfo for the given type.
QualType getDependentNameType(ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, QualType Canon=QualType()) const
SourceLocation getBeginLoc() const LLVM_READONLY
NameKind getNameKind() const
Determine what kind of name this is.
OpenMPLinearClauseKind
OpenMP attributes for 'linear' clause.
SourceLocation getEndLoc() const
bool isAcceptableTagRedeclaration(const TagDecl *Previous, TagTypeKind NewTag, bool isDefinition, SourceLocation NewTagLoc, const IdentifierInfo *Name)
Determine whether a tag with a given kind is acceptable as a redeclaration of the given tag declarati...
Represents a member of a struct/union/class.
TemplateName getTemplateName() const
Retrieve the name of the template that we are specializing.
const Type * getAsType() const
Retrieve the type stored in this nested name specifier.
This represents clause 'lastprivate' in the '#pragma omp ...' directives.
The current expression is potentially evaluated at run time, which means that code may be generated t...
SubstTemplateTemplateParmPackStorage * getAsSubstTemplateTemplateParmPack() const
Retrieve the substituted template template parameter pack, if known.
Expr * getBase()
Retrieve the base object of this member expressions, e.g., the x in x.m.
Represents a place-holder for an object not to be initialized by anything.
SourceLocation getBeginLoc() const
SourceLocation getEndLoc() const LLVM_READONLY
VarDecl * getPromiseDecl() const
ArrayRef< Expr * > getAllExprs() const
unsigned getFunctionScopeIndex() const
Returns the index of this parameter in its prototype or method scope.
SourceLocation getLParenLoc() const
Returns the location of '('.
UnaryExprOrTypeTrait
Names for the "expression or type" traits.
CompoundStmt * getBody() const
Retrieve the body of the lambda.
SourceLocation getProtocolLAngleLoc() const
unsigned getArrayExprIndex() const
For an array element node, returns the index into the array of expressions.
SourceLocation getLabelLoc() const
NestedNameSpecifierLoc getQualifierLoc() const
bool hasExplicitTemplateArgs() const
Determines whether the member name was followed by an explicit template argument list.
void StartOpenMPDSABlock(OpenMPDirectiveKind K, const DeclarationNameInfo &DirName, Scope *CurScope, SourceLocation Loc)
Called on start of new data sharing attribute block.
Expr * getChunkSize()
Get chunk size.
SourceLocation getRBraceLoc() const
SourceLocation getOperatorLoc() const
void setName(DeclarationName N)
setName - Sets the embedded declaration name.
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
bool isReferenceType() const
This represents clause 'map' in the '#pragma omp ...' directives.
SourceLocation getRParenLoc() const
SourceLocation getDefaultKindKwLoc() const
Returns location of clause kind.
void setElaboratedKeywordLoc(SourceLocation Loc)
This represents clause 'to' in the '#pragma omp ...' directives.
SourceLocation getProtocolRAngleLoc() const
This represents '#pragma omp target simd' directive.
Expr * getSourceExpr() const
The source expression of an opaque value expression is the expression which originally generated the ...
Represents a C++ member access expression for which lookup produced a set of overloaded functions...
Wrapper for source info for unresolved typename using decls.
qual_iterator qual_begin() const
SourceLocation getRParenLoc() const
std::pair< VarDecl *, Expr * > get() const
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
ArrayRef< SourceLocation > getProtocolLocs() const
LookupResultKind getResultKind() const
OpenMPDirectiveKind getDirectiveKind() const
Expr * getSafelen() const
Return safe iteration space distance.
This represents '#pragma omp barrier' directive.
SourceLocation getQuestionLoc() const
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp, [NSNumber numberWithInt:42]];.
SourceRange getSourceRange() const LLVM_READONLY
Expr * getNumTeams()
Return NumTeams number.
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
This represents '#pragma omp critical' directive.
bool isAssignmentOp() const
LambdaCaptureDefault getCaptureDefault() const
Determine the default capture kind for this lambda.
No entity found met the criteria within the current instantiation,, but there were dependent base cla...
bool hasExplicitTemplateArgs() const
Determines whether this lookup had explicit template arguments.
SourceLocation getLParenLoc() const
Qualifiers getLocalQualifiers() const
Retrieve the set of qualifiers local to this particular QualType instance, not including any qualifie...
SourceLocation getCatchLoc() const
An r-value expression (a pr-value in the C++11 taxonomy) produces a temporary value.
StmtResult ActOnAttributedStmt(SourceLocation AttrLoc, ArrayRef< const Attr *> Attrs, Stmt *SubStmt)
Represents Objective-C's @catch statement.
DeclClass * getAsSingle() const
This represents clause 'copyprivate' in the '#pragma omp ...' directives.
OpenMPDistScheduleClauseKind
OpenMP attributes for 'dist_schedule' clause.
IndirectGotoStmt - This represents an indirect goto.
Describes an C or C++ initializer list.
SourceLocation getLAngleLoc() const
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
ArrayRef< SourceLocation > getMapTypeModifiersLoc() const LLVM_READONLY
Fetches ArrayRef of location of map-type-modifiers.
This represents '#pragma omp distribute parallel for' composite directive.
void setProtocolLoc(unsigned i, SourceLocation Loc)
Expr * getKeyExpr() const
This represents '#pragma omp teams distribute parallel for simd' composite directive.
Represents a C++ unqualified-id that has been parsed.
CXXRecordDecl * getAsRecordDecl() const
Retrieve the record declaration stored in this nested name specifier.
UnresolvedUsingTypenameDecl * getDecl() const
IdentifierInfo * getAsIdentifier() const
Retrieve the identifier stored in this nested name specifier.
void setLParenLoc(SourceLocation Loc)
ForStmt - This represents a 'for (init;cond;inc)' stmt.
void resolveKind()
Resolves the result kind of the lookup, possibly hiding decls.
void setAttr(const Attr *A)
void setNameLoc(SourceLocation Loc)
Represents the results of name lookup.
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
SourceLocation getLParenLoc() const
FunctionDecl * getOperatorDelete() const
friend bool operator!=(const TemplateArgumentLocInventIterator &X, const TemplateArgumentLocInventIterator &Y)
Expr * getBaseExpr() const
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
bool isElidable() const
Whether this construction is elidable.
void setRAngleLoc(SourceLocation Loc)
Expr * getOperand() const
const Expr * getThrowExpr() const
Wrapper for source info for injected class names of class templates.
< Capturing the *this object by copy
unsigned getNumProtocols() const
SourceLocation getProtocolLoc(unsigned i) const
SourceLocation getSigilLoc() const
A convenient class for passing around template argument information.
SourceLocation getLocation() const
ExprResult ActOnDesignatedInitializer(Designation &Desig, SourceLocation Loc, bool GNUSyntax, ExprResult Init)
LabelDecl * getDecl() const
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getLBracLoc() const
SourceLocation getRParenLoc() const
Expr * getInitializer()
The initializer of this new-expression.
SourceLocation getIsaMemberLoc() const
getMemberLoc - Return the location of the "member", in X->F, it is the location of 'F'...
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding this name, if any.
SourceLocation getElaboratedKeywordLoc() const
NamespaceAliasDecl * getAsNamespaceAlias() const
Retrieve the namespace alias stored in this nested name specifier.
Wrapper for substituted template type parameters.
bool containsUnexpandedParameterPack() const
Whether this type is or contains an unexpanded parameter pack, used to support C++0x variadic templat...
QualType FunctionType
BlockType - The function type of the block, if one was given.
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
Represents a declaration of a type.
A builtin binary operation expression such as "x + y" or "x <= y".
Wrapper for substituted template type parameters.
SourceLocation getColonLoc() const
Gets location of ':' symbol in clause.
bool constructsVBase() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
const Expr * getAssocExpr(unsigned i) const
LangAS getAddressSpace() const
Expr * getOutputExpr(unsigned i)
SourceLocation getLParenLoc() const
void setRParenLoc(SourceLocation Loc)
SourceLocation getThrowLoc() const
const StringLiteral * getInputConstraintLiteral(unsigned i) const
TemplateArgumentLocContainerIterator & operator++()
const Type * getClass() const
CXXForRangeStmt - This represents C++0x [stmt.ranged]'s ranged for statement, represented as 'for (ra...
CXXRecordDecl * getDecl() const
This represents '#pragma omp cancellation point' directive.
This represents 'default' clause in the '#pragma omp ...' directive.
Expr * IgnoreParenCasts() LLVM_READONLY
IgnoreParenCasts - Ignore parentheses and casts.
ObjCStringLiteral, used for Objective-C string literals i.e.
std::input_iterator_tag iterator_category
SourceLocation getEqualOrColonLoc() const
Retrieve the location of the '=' that precedes the initializer value itself, if present.
SourceLocation getTemplateKeywordLoc() const
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
Expr * getSizeExpr() const
const CallExpr * getConfig() const
Wrapper for source info for ObjC interfaces.
FPOptions getFPFeatures() const
SourceLocation getLocalEndLoc() const
Retrieve the location of the end of this component of the nested-name-specifier.
param_type_iterator param_type_begin() const
CaseStmt - Represent a case statement.
NonTagKind
Common ways to introduce type names without a tag for use in diagnostics.
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
This represents 'final' clause in the '#pragma omp ...' directive.
This represents 'mergeable' clause in the '#pragma omp ...' directive.
SourceLocation getCaretLocation() const
This represents '#pragma omp teams' directive.
OpenMPDependClauseKind getDependencyKind() const
Get dependency type.
void append(iterator I, iterator E)
Represents a C++ nested-name-specifier or a global scope specifier.
const Expr * getControllingExpr() const
This represents clause 'reduction' in the '#pragma omp ...' directives.
FieldDecl * getField()
Get the field whose initializer will be used.
Helper class for OffsetOfExpr.
Expr * getOperand() const
This represents '#pragma omp teams distribute simd' combined directive.
Represents binding an expression to a temporary.
StringLiteral * getClobberStringLiteral(unsigned i)
ArrayTypeTrait
Names for the array type traits.
Expr * Key
The key for the dictionary element.
SourceLocation getBuiltinLoc() const
void setProtocolLoc(unsigned i, SourceLocation Loc)
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.
static IntegerLiteral * Create(const ASTContext &C, const llvm::APInt &V, QualType type, SourceLocation l)
Returns a new integer literal with value 'V' and type 'type'.
NestedNameSpecifierLoc getQualifierLoc() const
If the name was qualified, retrieves the nested-name-specifier that precedes the name, with source-location information.
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.
SourceLocation getTryLoc() const
Represents a C++ member access expression where the actual member referenced could not be resolved be...
This represents clause 'is_device_ptr' in the '#pragma omp ...' directives.
void setLocalRangeBegin(SourceLocation L)
Represents the body of a CapturedStmt, and serves as its DeclContext.
VarDecl * getConditionVariable() const
Retrieve the variable declared in this "for" statement, if any.
ExprResult BuildMemberReferenceExpr(Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs, const Scope *S, ActOnMemberAccessExtraArgs *ExtraArgs=nullptr)
SourceLocation getOperatorLoc() const
getOperatorLoc - Return the location of the operator.
void addDecl(NamedDecl *D)
Add a declaration to these results with its natural access.
Member name lookup, which finds the names of class/struct/union members.
bool isInitCapture(const LambdaCapture *Capture) const
Determine whether one of this lambda's captures is an init-capture.
const Stmt * getBody() const
static UnresolvedLookupExpr * Create(const ASTContext &Context, CXXRecordDecl *NamingClass, NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo, bool RequiresADL, bool Overloaded, UnresolvedSetIterator Begin, UnresolvedSetIterator End)
unsigned getNumArgs() const
TypeSourceInfo * getTypeSourceInfo() const
The current context is "potentially evaluated" in C++11 terms, but the expression is evaluated at com...
SourceLocation getProtocolRAngleLoc() const
NestedNameSpecifierLoc getWithLocInContext(ASTContext &Context) const
Retrieve a nested-name-specifier with location information, copied into the given AST context...
SourceLocation getElaboratedKeywordLoc() const
Expr * getSizeExpr() const
static Opcode getOverloadedOpcode(OverloadedOperatorKind OO, bool Postfix)
Retrieve the unary opcode that corresponds to the given overloaded operator.
A default argument (C++ [dcl.fct.default]).
void setAttrNameLoc(SourceLocation loc)
QualType getPointeeTypeAsWritten() const
bool isTypeOperand() const
Expr * getSizeExpr() const
Stmt * getReturnStmt() const
QualType getElementType() const
SourceLocation getMemberLoc() const
Retrieve the location of the name of the member that this expression refers to.
RAII object used to change the argument pack substitution index within a Sema object.
TypeSpecTypeLoc pushTypeSpec(QualType T)
Pushes space for a typespec TypeLoc.
Represents an extended vector type where either the type or size is dependent.
NamedDecl * getFirstQualifierFoundInScope() const
Retrieve the first part of the nested-name-specifier that was found in the scope of the member access...
This represents clause 'from' in the '#pragma omp ...' directives.
Represents the this expression in C++.
SourceLocation getBeginLoc() const LLVM_READONLY
TyLocType push(QualType T)
Pushes space for a new TypeLoc of the given type.
SourceLocation getLParenLoc() const
Returns the location of '('.
SourceLocation getRParenLoc() const
Retrieve the location of the right parentheses (')') that follows the argument list.
A helper class for building up ExtParameterInfos.
TypeSourceInfo * getAllocatedTypeSourceInfo() const
lookup_result lookup(DeclarationName Name) const
lookup - Find the declarations (if any) with the given Name in this context.
NestedNameSpecifierLoc getQualifierLoc() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name...
Class that aids in the construction of nested-name-specifiers along with source-location information ...
TypeTrait
Names for traits that operate specifically on types.
TypeSourceInfo * getQueriedTypeSourceInfo() const
SourceLocation getTemplateKeywordLoc() const
Expr ** getSubExprs()
Retrieve the array of expressions.
const ObjCAtCatchStmt * getCatchStmt(unsigned I) const
Retrieve a @catch statement.
Represents a K&R-style 'int foo()' function, which has no information available about its arguments...
Expr * getAddrSpaceExpr() const
helper_expr_const_range reduction_ops() const
This represents '#pragma omp target parallel for simd' directive.
llvm::Optional< bool > getKnownValue() const
OpenMP 4.0 [2.4, Array Sections].
This represents 'dynamic_allocators' clause in the '#pragma omp requires' directive.
ConditionalOperator - The ?: ternary operator.
SourceLocation getBuiltinLoc() const
TypeSourceInfo * getTypeSourceInfo() const
Sema - This implements semantic analysis and AST building for C.
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
CompoundStmt - This represents a group of statements like { stmt stmt }.
OpenMPDefaultClauseKind getDefaultKind() const
Returns kind of the clause.
Represents a prototype with parameter type info, e.g.
SourceLocation getRBracket() const
This represents 'threads' clause in the '#pragma omp ...' directive.
CompoundStmt * getSubStmt() const
Retrieve the compound statement that will be included in the program only if the existence of the sym...
This represents '#pragma omp taskgroup' directive.
Expr * getSimdlen() const
Return safe iteration space distance.
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
void TypeWasModifiedSafely(QualType T)
Tell the TypeLocBuilder that the type it is storing has been modified in some safe way that doesn't a...
A RAII object to enter scope of a compound statement.
SourceLocation getEndLoc() const
This represents clause 'aligned' in the '#pragma omp ...' directives.
const TemplateArgumentLoc * getTemplateArgs() const
Retrieve the template arguments provided as part of this template-id.
OpenMPClauseKind getClauseKind() const
Returns kind of OpenMP clause (private, shared, reduction, etc.).
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation getNameLoc() const
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
ArraySizeModifier
Capture whether this is a normal array (e.g.
SourceLocation getTryLoc() const
SourceLocation getRBracketLoc() const
This represents clause 'task_reduction' in the '#pragma omp taskgroup' directives.
SourceLocation getLocation() const
void setSizeExpr(Expr *Size)
SourceRange getRange() const
SourceLocation getLParenLoc() const
Returns the location of '('.
ConstantExpr - An expression that occurs in a constant context.
ObjCTypeParamDecl * getDecl() const
Represents a call to the builtin function __builtin_va_arg.
void setArgLocInfo(unsigned i, TemplateArgumentLocInfo AI)
static CXXDefaultArgExpr * Create(const ASTContext &C, SourceLocation Loc, ParmVarDecl *Param)
pointer operator->() const
TypeSourceInfo * getTrivialTypeSourceInfo(QualType T, SourceLocation Loc=SourceLocation()) const
Allocate a TypeSourceInfo where all locations have been initialized to a given location, which defaults to the empty location.
OpenMPProcBindClauseKind getProcBindKind() const
Returns kind of the clause.
SourceLocation getLabelLoc() const
bool isImplicitAccess() const
True if this is an implicit access, i.e.
SourceLocation getThrowLoc() const LLVM_READONLY
static unsigned getNumSubExprs(AtomicOp Op)
Determine the number of arguments the specified atomic builtin should have.
void setTemplateNameLoc(SourceLocation Loc)
This represents '#pragma omp distribute' directive.
This represents implicit clause 'depend' for the '#pragma omp task' directive.
An Objective-C property is a logical field of an Objective-C object which is read and written via Obj...
Represents an array type in C++ whose size is a value-dependent expression.
SourceLocation getDestroyedTypeLoc() const
Retrieve the starting location of the type being destroyed.
SourceLocation getBeginLoc() const
Get the begin source location.
SourceLocation getFinallyLoc() const
SourceLocation getTemplateNameLoc() const
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type...
Retains information about a block that is currently being parsed.
pointer(TemplateArgumentLoc Arg)
SourceLocation getOperatorLoc() const
Retrieve the location of the '->' or '.' operator.
const Stmt * getAssociatedStmt() const
Returns statement associated with the directive.
CXXMethodDecl * CallOperator
The lambda's compiler-generated operator().
static CallExpr * Create(const ASTContext &Ctx, Expr *Fn, ArrayRef< Expr *> Args, QualType Ty, ExprValueKind VK, SourceLocation RParenLoc, unsigned MinNumArgs=0, ADLCallKind UsesADL=NotADL)
Create a call expression.
Type source information for an attributed type.
QualType getCXXNameType() const
If this name is one of the C++ names (of a constructor, destructor, or conversion function)...
SourceLocation getBeginLoc() const LLVM_READONLY
Pepresents a block literal declaration, which is like an unnamed FunctionDecl.
unsigned getFunctionScopeDepth() const
void setQualifierLoc(NestedNameSpecifierLoc QualifierLoc)
llvm::MutableArrayRef< Designator > designators()
NamespaceDecl * getAsNamespace() const
Retrieve the namespace stored in this nested name specifier.
This represents 'proc_bind' clause in the '#pragma omp ...' directive.
The current expression is potentially evaluated, but any declarations referenced inside that expressi...
This represents 'capture' clause in the '#pragma omp atomic' directive.
DeclAccessPair getFoundDecl() const
Retrieves the declaration found by lookup.
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
This represents one expression.
SourceLocation getLocalRangeEnd() const
SourceLocation getElseLoc() const
The "typename" keyword precedes the qualified type name, e.g., typename T::type.
SourceLocation getCaptureDefaultLoc() const
Retrieve the location of this lambda's capture-default, if any.
TemplateArgumentLoc const * getTemplateArgs() const
ArrayRef< StringRef > getClobbers() const
IdentifierInfo * getFieldName() const
For a field or identifier offsetof node, returns the name of the field.
SourceLocation getMapLoc() const LLVM_READONLY
Fetches location of clause mapping kind.
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '...
This represents 'simdlen' clause in the '#pragma omp ...' directive.
Expr * getNumTasks() const
Return safe iteration space distance.
SourceLocation getDefaultLoc() const
SourceLocation getScheduleKindLoc()
Get kind location.
TemplateArgumentLocInventIterator(TreeTransform< Derived > &Self, InputIterator Iter)
bool isImplicitAccess() const
True if this is an implicit access, i.e., one in which the member being accessed was not written in t...
SourceLocation getWhileLoc() const
UnqualTypeLoc getUnqualifiedLoc() const
Skips past any qualifiers, if this is qualified.
SourceRange getBracketsRange() const
const T * castAs() const
Member-template castAs<specific type>.
Represents a C++ functional cast expression that builds a temporary object.
ElaboratedTypeKeyword
The elaboration keyword that precedes a qualified type name or introduces an elaborated-type-specifie...
The template argument is a null pointer or null pointer to member that was provided for a non-type te...
SourceLocation getBeginLoc() const
Retrieve the location of the beginning of this nested-name-specifier.
SourceLocation getLParenLoc() const
Returns the location of '('.
A C++ const_cast expression (C++ [expr.const.cast]).
unsigned getNumParams() const
const TypeSourceInfo * getAssocTypeSourceInfo(unsigned i) const
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
T getAs() const
Convert to the specified TypeLoc type, returning a null TypeLoc if this TypeLoc is not of the desired...
Represents a C++ destructor within a class.
VarDecl * getExceptionDecl() const
IdentifierInfo * getDestroyedTypeIdentifier() const
In a dependent pseudo-destructor expression for which we do not have full type information on the des...
unsigned getNumInits() const
TemplateArgumentLocInventIterator & operator++()
This represents '#pragma omp target teams distribute parallel for simd' combined directive.
bool isIfNotExists() const
Determine whether this is an __if_exists statement.
bool isArrow() const
Determine whether this pseudo-destructor expression was written using an '->' (otherwise, it used a '.
unsigned getNumTemplateArgs() const
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
const CompoundStmt * getSynchBody() const
DeclContext * getDeclContext()
SourceLocation getLParenLoc() const
const IdentifierInfo * getIdentifier() const
Retrieve the type named by the typename specifier as an identifier.
Represents Objective-C's @synchronized statement.
ObjCSelectorExpr used for @selector in Objective-C.
Expr ** getArgs()
Retrieve the arguments to this message, not including the receiver.
SourceLocation getEllipsisLoc() const
TypeSourceInfo * getNamedTypeInfo() const
getNamedTypeInfo - Returns the source type info associated to the name.
TypeSourceInfo * getTypeSourceInfo() const
NestedNameSpecifierLoc getPrefix() const
Return the prefix of this nested-name-specifier.
Represents an expression that computes the length of a parameter pack.
SourceLocation getRBracketLoc() const
CXXTryStmt - A C++ try block, including all handlers.
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
OpenMPDistScheduleClauseKind getDistScheduleKind() const
Get kind of the clause.
SourceLocation getAtTryLoc() const
Retrieve the location of the @ in the @try.
void setRParenLoc(SourceLocation Loc)
FunctionDecl * getDirectCallee()
If the callee is a FunctionDecl, return it. Otherwise return null.
IdentifierInfo & getAccessor() const
Represents a C++ template name within the type system.
Represents the type decltype(expr) (C++11).
This represents '#pragma omp target teams distribute simd' combined directive.
ArrayTypeTrait getTrait() const
A namespace alias, stored as a NamespaceAliasDecl*.
This represents 'ordered' clause in the '#pragma omp ...' directive.
The current expression and its subexpressions occur within an unevaluated operand (C++11 [expr]p7)...
SourceRange getAngleBrackets() const LLVM_READONLY
Kind getKind() const
Determine what kind of offsetof node this is.
void setLParenLoc(SourceLocation Loc)
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
SourceLocation getColonLoc() const
Get colon location.
An RAII helper that pops function a function scope on exit.
SourceLocation getLocalRangeBegin() const
SourceLocation getKeywordLoc() const
Retrieve the location of the __if_exists or __if_not_exists keyword.
Wrapper for source info for enum types.
This represents '#pragma omp for' directive.
static QualType TransformTypeSpecType(TypeLocBuilder &TLB, TyLoc T)
SourceLocation getProtocolLAngleLoc() const
Expr * getPattern() const
Get the pattern, that is, the operand that contains an unexpanded pack.
Optional< unsigned > NumExpansions
The number of elements this pack expansion will expand to, if this is a pack expansion and is known...
SourceLocation getSwitchLoc() const
void setEllipsisLoc(SourceLocation Loc)
void setAttrExprOperand(Expr *e)
Declaration of an alias template.
LabelDecl * getLabel() const
const Stmt * getTryBody() const
Retrieve the @try body.
Represents a folding of a pack over an operator.
ProtocolLAngleLoc, ProtocolRAngleLoc, and the source locations for protocol qualifiers are stored aft...
ReturnStmt - This represents a return, optionally of an expression: return; return 4;...
This represents '#pragma omp target teams' directive.
void setHasBaseTypeAsWritten(bool HasBaseType)
A boolean condition, from 'if', 'while', 'for', or 'do'.
An expression that sends a message to the given Objective-C object or class.
This represents a Microsoft inline-assembly statement extension.
SourceLocation getDoLoc() const
SourceLocation getAtLoc() const
ObjCMethodDecl * getImplicitPropertyGetter() const
Expr * getSubExprAsWritten()
Retrieve the cast subexpression as it was written in the source code, looking through any implicit ca...
SourceLocation getRBracketLoc() const
SourceLocation getEnd() const
UnaryOperator - This represents the unary-expression's (except sizeof and alignof), the postinc/postdec operators from postfix-expression, and various extensions.
bool isInstanceMethod() const
SourceLocation getMemberLoc() const
getMemberLoc - Return the location of the "member", in X->F, it is the location of 'F'...
Represents a GCC generic vector type.
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
ArraySizeModifier getSizeModifier() const
bool usesGNUSyntax() const
Determines whether this designated initializer used the deprecated GNU syntax for designated initiali...
struct CXXOpName CXXOperatorName
SourceLocation getEndLoc() const LLVM_READONLY
ExprResult ActOnChooseExpr(SourceLocation BuiltinLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr, SourceLocation RPLoc)
A member reference to an MSPropertyDecl.
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
Represents a reference to a non-type template parameter that has been substituted with a template arg...
const OffsetOfNode & getComponent(unsigned Idx) const
Expr * getDevice()
Return device number.
const FunctionProtoType::ExtParameterInfo * getPointerOrNull(unsigned numParams)
Return a pointer (suitable for setting in an ExtProtoInfo) to the ExtParameterInfo array we've built ...
This represents '#pragma omp cancel' directive.
This represents 'collapse' clause in the '#pragma omp ...' directive.
This represents clause 'firstprivate' in the '#pragma omp ...' directives.
bool isPackExpansion() const
Determine whether this template argument is a pack expansion.
SourceLocation getCommaLoc()
Get location of ','.
SourceLocation getLocation() const
SourceLocation getRParenLoc() const
QualType getTypeDeclType(const TypeDecl *Decl, const TypeDecl *PrevDecl=nullptr) const
Return the unique reference to the type for the specified type declaration.
SourceLocation getForLoc() const
QualType getDestroyedType() const
Retrieve the type being destroyed.
const Expr * getSubExpr() const
ObjCBridgeCastKind getBridgeKind() const
Determine which kind of bridge is being performed via this cast.
const Expr * getSubExpr() const
void setQualifierLoc(NestedNameSpecifierLoc QualifierLoc)
CStyleCastExpr - An explicit cast in C (C99 6.5.4) or a C-style cast in C++ (C++ [expr.cast]), which uses the syntax (Type)expr.
SourceLocation getPackLoc() const
Determine the location of the parameter pack.
CXXMethodDecl * getCallOperator() const
Retrieve the function call operator associated with this lambda expression.
OpenMPProcBindClauseKind
OpenMP attributes for 'proc_bind' clause.
bool isNull() const
Return true if this QualType doesn't point to a type yet.
A type, stored as a Type*.
InitializationStyle getInitStyle() const
The style of initialization for this declaration.
Expr * getLHS()
An array access can be written A[4] or 4[A] (both are equivalent).
TypeLoc getReturnLoc() const
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1...
This represents '#pragma omp flush' directive.
SourceLocation getEndLoc() const LLVM_READONLY
This represents '#pragma omp parallel for simd' directive.
ExprObjectKind getObjectKind() const
getObjectKind - The object kind that this expression produces.
static SEHFinallyStmt * Create(const ASTContext &C, SourceLocation FinallyLoc, Stmt *Block)
DoStmt - This represents a 'do/while' stmt.
This represents 'seq_cst' clause in the '#pragma omp atomic' directive.
SourceLocation getOperatorLoc() const
Retrieve the location of the '->' or '.' operator.
This represents 'untied' clause in the '#pragma omp ...' directive.
TemplateArgumentLocInventIterator operator++(int)
ExprResult BuildCXXNoexceptExpr(SourceLocation KeyLoc, Expr *Operand, SourceLocation RParen)
SourceLocation getLParenLoc() const
Retrieve the location of the left parentheses ('(') that precedes the argument list.
QualType getAutoType(QualType DeducedType, AutoTypeKeyword Keyword, bool IsDependent) const
C++11 deduced auto type.
bool hasTrailingReturn() const
Whether this function prototype has a trailing return type.
RecordDecl * getDecl() 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.
void setIsVariadic(bool value)
NestedNameSpecifier * getScopeRep() const
Retrieve the representation of the nested-name-specifier.
void setTypeofLoc(SourceLocation Loc)
This represents 'unified_address' clause in the '#pragma omp requires' directive. ...
const DeclarationNameInfo & getNameInfo() const
Retrieve the name that this expression refers to.
This represents '#pragma omp target enter data' directive.
Simple iterator that traverses the template arguments in a container that provides a getArgLoc() memb...
SourceLocation getLParenLoc()
Get location of '('.
static Opcode getOverloadedOpcode(OverloadedOperatorKind OO)
Retrieve the binary opcode that corresponds to the given overloaded operator.
char * location_data() const
Retrieve the data associated with the source-location information.
friend bool operator==(const TemplateArgumentLocContainerIterator &X, const TemplateArgumentLocContainerIterator &Y)
Wrapper for source info for arrays.
bool isComputedNoexcept(ExceptionSpecificationType ESpecType)
SourceLocation getColonLoc() const
Returns the location of ':'.
This represents 'num_teams' clause in the '#pragma omp ...' directive.
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class...
SourceLocation getTemplateNameLoc() const
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
unsigned getNumArgs() const
Return the number of actual arguments in this message, not counting the receiver. ...
SourceLocation getLParenLoc() const
Tag name lookup, which finds the names of enums, classes, structs, and unions.
TypeLoc getPatternLoc() const
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr...
This captures a statement into a function.
A field in a dependent type, known only by its name.
Expr * getInit() const
Get the operand that doesn't contain a pack, for a binary fold.
QualType getCanonicalType() const
Represents a call to an inherited base class constructor from an inheriting constructor.
ExpressionTrait getTrait() const
ActionResult - This structure is used while parsing/acting on expressions, stmts, etc...
ExceptionSpecificationType Type
The kind of exception specification this is.
Expr ** getPlacementArgs()
SourceLocation getLParenLoc()
Get location of '('.
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
QualType getElaboratedType(ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, QualType NamedType, TagDecl *OwnedTagDecl=nullptr) const
void setLAngleLoc(SourceLocation Loc)
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
ElaboratedTypeKeyword getKeyword() const
ExtProtoInfo getExtProtoInfo() const
const Attr * getAttr() const
The type attribute.
TemplateArgumentLocInventIterator()
friend bool operator!=(const TemplateArgumentLocContainerIterator &X, const TemplateArgumentLocContainerIterator &Y)
SourceLocation getNameLoc() const
Gets the location of the name.
const ExtParameterInfo * ExtParameterInfos
bool inheritedFromVBase() const
Determine whether the inherited constructor is inherited from a virtual base of the object we constru...
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
unsigned getNumExprs() const
Return the number of expressions in this paren list.
This represents '#pragma omp single' directive.
Encodes a location in the source.
SourceLocation getStarLoc() const
SourceLocation getEndLoc() const LLVM_READONLY
capture_iterator explicit_capture_begin() const
Retrieve an iterator pointing to the first explicit lambda capture.
QualType getReturnType() const
IdentifierInfo & get(StringRef Name)
Return the identifier token info for the specified named identifier.
This represents 'hint' clause in the '#pragma omp ...' directive.
OpenMPDependClauseKind
OpenMP attributes for 'depend' clause.
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of enums...
SourceLocation getOperatorLoc() const
const Stmt * getCatchBody() const
LangAS getAddressSpace() const
Return the address space of this type.
unsigned getNumHandlers() const
Expr * getSubExpr() const
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 getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
std::pair< NullabilityKind, bool > DiagNullabilityKind
A nullability kind paired with a bit indicating whether it used a context-sensitive keyword...
NestedNameSpecifierLoc getQualifierLoc() const
Retrieves the nested-name-specifier that qualifies the type name, with source-location information...
This is a basic class for representing single OpenMP executable directive.
A structure for storing an already-substituted template template parameter pack.
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
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c dictionary literal.
void setProtocolLAngleLoc(SourceLocation Loc)
StmtResult ActOnLabelStmt(SourceLocation IdentLoc, LabelDecl *TheDecl, SourceLocation ColonLoc, Stmt *SubStmt)
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit...
DeclarationName getName() const
getName - Returns the embedded declaration name.
Represents the declaration of a struct/union/class/enum.
MutableArrayRef< Expr * > MultiExprArg
This represents 'schedule' clause in the '#pragma omp ...' directive.
SourceLocation getEllipsisLoc() const
Retrieve the location of the ellipsis that describes this pack expansion.
QualType CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc)
Build the type that describes a C++ typename specifier, e.g., "typename T::type". ...
static SizeOfPackExpr * Create(ASTContext &Context, SourceLocation OperatorLoc, NamedDecl *Pack, SourceLocation PackLoc, SourceLocation RParenLoc, Optional< unsigned > Length=None, ArrayRef< TemplateArgument > PartialArgs=None)
Represents a call to a member function that may be written either with member call syntax (e...
SourceLocation getExceptLoc() const
SourceRange getSourceRange() const LLVM_READONLY
QualType getElementType() const
DeclStmt - Adaptor class for mixing declarations with statements and expressions. ...
OpenMPDirectiveKind
OpenMP directives.
Represents the declaration of a label.
SourceLocation getLParenLoc() const
Returns the location of '('.
This represents clause 'shared' in the '#pragma omp ...' directives.
Represents a vector type where either the type or size is dependent.
void setProtocolRAngleLoc(SourceLocation Loc)
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getProcBindKindKwLoc() const
Returns location of clause kind.
DeclarationNameInfo getDirectiveName() const
Return name of the directive.
SourceLocation getLBraceLoc() const
Represents a static or instance method of a struct/union/class.
Expr * getPriority()
Return Priority number.
ExprResult SemaBuiltinShuffleVector(CallExpr *TheCall)
SemaBuiltinShuffleVector - Handle __builtin_shufflevector.
SourceLocation getColonLoc() const
SourceLocation getRParenLoc() const
OpenMPLinearClauseKind Modifier
Modifier of 'linear' clause.
SourceLocation getRParenLoc() const
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
C-style initialization with assignment.
pointer operator->() const
SourceLocation getSuperLoc() const
Retrieve the location of the 'super' keyword for a class or instance message to 'super', otherwise an invalid source location.
SourceLocation getAtLoc() const
This represents '#pragma omp taskwait' directive.
QualType getAllocatedType() const
OpenMPMapClauseKind getMapType() const LLVM_READONLY
Fetches mapping kind for the clause.
SourceLocation getRParenLoc() const
const ParmVarDecl * getParamDecl(unsigned i) const
SourceLocation getLocation() const
Name lookup found an unresolvable value declaration and cannot yet complete.
void reserve(size_t Requested)
Ensures that this buffer has at least as much capacity as described.
This is a basic class for representing single OpenMP clause.
ExprResult ActOnInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc)
QualType getEquivalentType() const
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load, __atomic_store, and __atomic_compare_exchange_*, for the similarly-named C++11 instructions, and __c11 variants for <stdatomic.h>, and corresponding __opencl_atomic_* for OpenCL 2.0.
UnaryExprOrTypeTrait getKind() const
void addDecl(NamedDecl *D)
ObjCProtocolExpr used for protocol expression in Objective-C.
SourceLocation getStarLoc() const
bool isValueDependent() const
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
QualType getReceiverType() const
Retrieve the receiver type to which this message is being directed.
SourceLocation getLParenLoc() const
SourceLocation getGotoLoc() const
SourceLocation getAtFinallyLoc() const
bool isObjCObjectPointerType() const
SourceLocation getNameModifierLoc() const
Return the location of directive name modifier.
const StringLiteral * getOutputConstraintLiteral(unsigned i) const
Represents one property declaration in an Objective-C interface.
void setElaboratedKeywordLoc(SourceLocation Loc)
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Stmt * getCapturedStmt()
Retrieve the statement being captured.
SourceLocation getAtCatchLoc() const
Expr ** getInits()
Retrieve the set of initializers.
This represents '#pragma omp target' directive.
Expr * getInputExpr(unsigned i)
ExprResult BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false)
Build an Objective-C class message expression.
Expr * getNumForLoops() const
Return the number of associated for-loops.
void setLBracketLoc(SourceLocation Loc)
No entity found met the criteria.
AutoTypeKeyword getKeyword() const
SourceLocation getEndLoc() const
Expr * getArrayRangeStart(const Designator &D) const
SourceLocation getRAngleLoc() const
The name is a dependent name, so the results will differ from one instantiation to the next...
An expression trait intrinsic.
SourceLocation getBeginLoc() const LLVM_READONLY
EnumDecl * getDecl() const
const ObjCMethodDecl * getMethodDecl() const
VarDecl * getConditionVariable()
Retrieve the variable declared in this "switch" statement, if any.
This represents '#pragma omp ordered' directive.
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
void set(unsigned index, FunctionProtoType::ExtParameterInfo info)
Set the ExtParameterInfo for the parameter at the given index,.
ArrayRef< ParmVarDecl * > getParams() const
This represents '#pragma omp target update' directive.
bool RequireCompleteDeclContext(CXXScopeSpec &SS, DeclContext *DC)
Require that the context specified by SS be complete.
ObjCBoxedExpr - used for generalized expression boxing.
bool isArgumentType() const
unsigned getFullDataSize() const
Returns the size of the type source info data block.
static TagTypeKind getTagTypeKindForKeyword(ElaboratedTypeKeyword Keyword)
Converts an elaborated type keyword into a TagTypeKind.
CXXRecordDecl * getNamingClass()
Retrieve the naming class of this lookup.
Optional< unsigned > getNumExpansions() const
Retrieve the number of expansions that this pack expansion will generate, if known.
SourceLocation getStarLoc() const
SourceLocation getLParenLoc() const
Returns the location of '('.
void setLAngleLoc(SourceLocation Loc)
void addArgument(const TemplateArgumentLoc &Loc)
DependentTemplateName * getAsDependentTemplateName() const
Retrieve the underlying dependent template name structure, if any.
FunctionDecl * getOperatorDelete() const
SourceLocation getBeginLoc() const LLVM_READONLY
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding this name, if any.
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name...
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
A qualified reference to a name whose declaration cannot yet be resolved.
TypeLoc getElementLoc() const
Expr * Value
The value of the dictionary element.
const Expr * getInitializer() const
QualType getPointeeType() const
Represents a pack expansion of types.
CompoundAssignOperator - For compound assignments (e.g.
SourceLocation getLocation() const LLVM_READONLY
Expr ** getElements()
Retrieve elements of array of literals.
DeclarationNameLoc - Additional source/type location info for a declaration name. ...
void setLParenLoc(SourceLocation Loc)
void setTemplateKeywordLoc(SourceLocation Loc)
Represents a C11 generic selection.
ArrayRef< TemplateArgument > getPartialArguments() const
Get.
void setTypeArgsLAngleLoc(SourceLocation Loc)
const Expr * getBase() const
Expr * getInstanceReceiver()
Returns the object expression (receiver) for an instance message, or null for a message that is not a...
AddrLabelExpr - The GNU address of label extension, representing &&label.
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers...
Base class for declarations which introduce a typedef-name.
SourceLocation getTypeofLoc() const
Represents a reference to a function parameter pack that has been substituted but not yet expanded...
Represents a template argument.
ArrayRef< OpenMPMapModifierKind > getMapTypeModifiers() const LLVM_READONLY
Fetches ArrayRef of map-type-modifiers.
SourceLocation getMemberLoc() const
TypeSourceInfo * getDestroyedTypeInfo() const
Retrieve the source location information for the type being destroyed.
TypeSourceInfo * getClassTInfo() const
NonTagKind getNonTagTypeDeclKind(const Decl *D, TagTypeKind TTK)
Given a non-tag type declaration, returns an enum useful for indicating what kind of non-tag type thi...
Expr * getFalseExpr() const
getFalseExpr - Return the subexpression which will be evaluated if the condnition evaluates to false;...
Represents a template name that was expressed as a qualified name.
TagTypeKind
The kind of a tag type.
NullStmt - This is the null statement ";": C99 6.8.3p3.
bool isMutable() const
Determine whether the lambda is mutable, meaning that any captures values can be modified.
OpenMPScheduleClauseModifier
OpenMP modifiers for 'schedule' clause.
bool isTypeOperand() const
static ParmVarDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, StorageClass S, Expr *DefArg)
bool isNull() const
Determine whether this template name is NULL.
unsigned getNumAssocs() const
Dataflow Directional Tag Classes.
SourceLocation getColonLoc() const
Get colon location.
This represents 'device' clause in the '#pragma omp ...' directive.
NestedNameSpecifier * getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
bool containsUnexpandedParameterPack() const
Whether this template argument contains an unexpanded parameter pack.
bool isValid() const
Return true if this is a valid SourceLocation object.
DeducedType * getContainedDeducedType() const
Get the DeducedType whose type will be deduced for a variable with an initializer of this type...
int ArgumentPackSubstitutionIndex
The current index into pack expansion arguments that will be used for substitution of parameter packs...
const TemplateArgumentLoc * getTemplateArgs() const
Retrieve the template arguments provided as part of this template-id.
Stmt * getReturnStmtOnAllocFailure() const
VarDecl * getConditionVariable()
Retrieve the variable declared in this "while" statement, if any.
const TemplateArgument & getArgument() const
not evaluated yet, for special member function
Expr * getAllocate() const
[C99 6.4.2.2] - A predefined identifier such as func.
DeclarationNameInfo getMemberNameInfo() const
Retrieve the member declaration name info.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
SourceLocation getLocation() const
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
ArrayRef< Capture > captures() const
IdentifierInfo * getOutputIdentifier(unsigned i) const
The base class of all kinds of template declarations (e.g., class, function, etc.).
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
SourceLocation ModifierLoc
Location of linear modifier if any.
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
ExprResult ImpCastExprToType(Expr *E, QualType Type, CastKind CK, ExprValueKind VK=VK_RValue, const CXXCastPath *BasePath=nullptr, CheckedConversionKind CCK=CCK_ImplicitConversion)
ImpCastExprToType - If Expr is not of type 'Type', insert an implicit cast.
MSPropertyDecl * getPropertyDecl() const
const Stmt * getFinallyBody() const
QualType getType() const
Get the type for which this source info wrapper provides information.
The template argument is a pack expansion of a template name that was provided for a template templat...
ArrayRef< const Attr * > getAttrs() const
bool hasDependentPromiseType() const
This represents '#pragma omp section' directive.
This represents '#pragma omp teams distribute' directive.
Expr * getReturnValueInit() const
Expr * getSourceExpression() const
Interesting information about a specific parameter that can't simply be reflected in parameter's type...
SourceLocation EllipsisLoc
The location of the ellipsis, if this is a pack expansion.
bool isDependent() const
Whether this nested name specifier refers to a dependent type or not.
TypeSourceInfo * getTypeSourceInfo() const
Retrieve the type source information for the type being constructed.
AccessSpecifier getAccess() const
A constant boolean condition from 'if constexpr'.
A runtime availability query.
TemplateArgumentLocContainerIterator(ArgLocContainer &Container, unsigned Index)
bool hasLocalQualifiers() const
Determine whether this particular QualType instance has any qualifiers, without looking through any t...
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
This represents '#pragma omp simd' directive.
TypeSourceInfo * getTypeSourceInfo() const
Stmt * getHandler() const
SourceLocation getRAngleLoc() const
Represents a 'co_yield' expression.
DeclarationName getMember() const
Retrieve the name of the member that this expression refers to.
SourceLocation getLBraceLoc() const
The name of a declaration.
StmtClass getStmtClass() const
Represents the declaration of an Objective-C type parameter.
VectorKind getVectorKind() const
SourceRange getIntroducerRange() const
Retrieve the source range covering the lambda introducer, which contains the explicit capture list su...
bool isCXXClassMember() const
Determine whether this declaration is a C++ class member.
Expr * getOperand() const
Retrieve the operand of the 'co_return' statement.
Represents a C++11 pack expansion that produces a sequence of expressions.
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
This represents 'unified_shared_memory' clause in the '#pragma omp requires' directive.
This represents clause 'linear' in the '#pragma omp ...' directives.
const Expr * getSynchExpr() const
Stmt * getInitSuspendStmt() const
A pointer to member type per C++ 8.3.3 - Pointers to members.
bool hasObjCLifetime() const
void setSigilLoc(SourceLocation Loc)
bool isIfExists() const
Determine whether this is an __if_exists statement.
TypeLoc getModifiedLoc() const
The modified type, which is generally canonically different from the attribute type.
SourceLocation getBeginLoc() const LLVM_READONLY
NestedNameSpecifierLoc getQualifierLoc() const
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...
TemplateArgumentLoc value_type
TemplateParameterList * getTemplateParameterList() const
If this is a generic lambda expression, retrieve the template parameter list associated with it...
This represents '#pragma omp atomic' directive.
SourceLocation getBeginLoc() const
Returns the starting location of the clause.
A type that was preceded by the 'template' keyword, stored as a Type*.
pack_iterator pack_begin() const
Iterator referencing the first argument of a template argument pack.
const TemplateTypeParmType * getReplacedParameter() const
Gets the template parameter that was substituted for.
bool isNull() const
Determine whether this template argument has no value.
SourceLocation getLParenLoc() const
Returns the location of '('.
SourceLocation getLParenLoc() const
ExprResult SemaConvertVectorExpr(Expr *E, TypeSourceInfo *TInfo, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
SemaConvertVectorExpr - Handle __builtin_convertvector.
bool isImplicitMapType() const LLVM_READONLY
Is this an implicit map type? We have to capture 'IsMapTypeImplicit' from the parser for more informa...
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Expr * getArrayRangeEnd(const Designator &D) const
TemplateNameKindForDiagnostics getTemplateNameKindForDiagnostics(TemplateName Name)
NestedNameSpecifierLoc getQualifierLoc() const
Represents a __leave statement.
SourceLocation getElaboratedKeywordLoc() const
QualType getModifiedType() const
unsigned getNumParams() const
LabelDecl * getLabel() const
void setNameLoc(SourceLocation Loc)
ExprResult BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false)
Build an Objective-C instance message expression.
SourceLocation getRBracketLoc() const
SourceLocation getEndLoc() const
Returns the ending location of the clause.
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
SourceRange getSourceRange() const LLVM_READONLY
Get the full source range.
SwitchStmt - This represents a 'switch' stmt.
SourceLocation getColonColonLoc() const
Retrieve the location of the '::' in a qualified pseudo-destructor expression.
Name lookup found a single declaration that met the criteria.
SourceLocation getBeginLoc() const
TypeLoc getPointeeLoc() const
Not an overloaded operator.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source location information.
SourceLocation getRParenLoc() const
DeclarationNameInfo getNameInfo() const
Represents the body of a coroutine.
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
ExprResult BuildObjCEncodeExpression(SourceLocation AtLoc, TypeSourceInfo *EncodedTypeInfo, SourceLocation RParenLoc)
Location wrapper for a TemplateArgument.
unsigned getIndexTypeCVRQualifiers() const
SourceLocation getBuiltinLoc() const
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
TypeSourceInfo * getTypeArgTInfo(unsigned i) const
SourceLocation getLParenLoc() const
Returns the location of '('.
OpenMPDirectiveKind getNameModifier() const
Return directive name modifier associated with the clause.
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c array literal.
This file defines OpenMP AST classes for executable directives and clauses.
Represents Objective-C's collection statement.
TypedefNameDecl * getTypedefNameDecl() const
SourceLocation getTemplateNameLoc() const
ObjCEncodeExpr, used for @encode in Objective-C.
SourceLocation getRParenLoc() const
Determine the location of the right parenthesis.
SourceLocation getKWLoc() const
SourceLocation getRParenLoc() const
SourceLocation getLocation() const
An implicit indirection through a C++ base class, when the field found is in a base class...
const llvm::APInt & getSize() const
void setTemplateNameLoc(SourceLocation Loc)
Represents a call to a CUDA kernel function.
bool isFunctionType() const
SourceLocation getRParenLoc() const
Represents a 'co_await' expression.
SourceLocation getLParenLoc() const
Returns the location of '('.
std::iterator_traits< InputIterator >::difference_type difference_type
TypeSourceInfo * getTypeSourceInfo() const
SourceLocation getColonLoc() const
Gets location of ':' symbol in clause.
void setOperatorFunctionId(SourceLocation OperatorLoc, OverloadedOperatorKind Op, SourceLocation SymbolLocations[3])
Specify that this unqualified-id was parsed as an operator-function-id.
SourceRange getDirectInitRange() const
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the member name, with source location information...
OpenMPScheduleClauseKind
OpenMP attributes for 'schedule' clause.
SourceLocation getProtocolLoc(unsigned i) const
Expr * getSizeExpr() const
Expr * getArg(unsigned Arg)
Return the specified argument.
Base for LValueReferenceType and RValueReferenceType.
SourceLocation getEndLoc() const
Retrieve the location of the end of this nested-name-specifier.
ImplicitParamDecl * getParam(unsigned i) const
TypeLocClass getTypeLocClass() const
void setTypeArgsRAngleLoc(SourceLocation Loc)
Wrapper for source info for record types.
SourceLocation getLBracketLoc() const
Represents Objective-C's @finally statement.
SourceLocation getDefaultLoc() const
The template argument is a type.
ExceptionSpecificationType
The various types of exception specifications that exist in C++11.
Wraps an ObjCPointerType with source location information.
Holds information about the various types of exception specification.
StringRef getAsmString() const
OpenMPDefaultClauseKind
OpenMP attributes for 'default' clause.
ArrayRef< StringRef > getAllConstraints() const
unsigned getNumArgs() const
SourceLocation getDistScheduleKindLoc()
Get kind location.
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
const Expr * getBase() const
The template argument is actually a parameter pack.
llvm::DenseMap< VarDecl *, unsigned > CaptureMap
CaptureMap - A map of captured variables to (index+1) into Captures.
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '...
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
SourceLocation getColonLoc() const
This represents 'write' clause in the '#pragma omp atomic' directive.
SourceLocation getLParenLoc() const
void setNamedTypeInfo(TypeSourceInfo *TInfo)
setNamedTypeInfo - Sets the source type info associated to the name.
unsigned getNumClobbers() const
SourceLocation getRParenLoc() const
ObjCIvarRefExpr - A reference to an ObjC instance variable.
ArrayRef< QualType > Exceptions
Explicitly-specified list of exception types.
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof...
DeclStmt * getRangeStmt()
unsigned arg_size() const
Retrieve the number of arguments.
bool capturesCXXThis() const
bool LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx, bool InUnqualifiedLookup=false)
Perform qualified name lookup into a given context.
SourceLocation getLParenLoc() const
Returns the location of '('.
TypeLoc getBaseLoc() const
UnqualTypeLoc getUnqualifiedLoc() const
llvm::iterator_range< decls_iterator > decls() const
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
SourceLocation getAsmLoc() const
GotoStmt - This represents a direct goto.
A use of a default initializer in a constructor or in aggregate initialization.
VectorType::VectorKind getVectorKind() const
TypeLoc getTypeLoc() const
Return the TypeLoc wrapper for the type source info.
bool isListInitialization() const
Determine whether this expression models list-initialization.
Expr * getSrcExpr() const
getSrcExpr - Return the Expr to be converted.
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
TypedefNameDecl * getDecl() const
X
Add a minimal nested name specifier fixit hint to allow lookup of a tag name from an outer enclosing ...
SourceLocation getLAngleLoc() const
void * getOpaqueData() const
Retrieve the opaque pointer that refers to source-location data.
SourceLocation getTypeArgsLAngleLoc() const
pack_iterator pack_end() const
Iterator referencing one past the last argument of a template argument pack.
Expr * NoexceptExpr
Noexcept expression, if this is a computed noexcept specification.
void AddDesignator(Designator D)
AddDesignator - Add a designator to the end of this list.
SourceLocation getLParenLoc() const
Returns the location of '('.
An integral condition for a 'switch' statement.
CapturedDecl * getCapturedDecl()
Retrieve the outlined function declaration.
ArgKind getKind() const
Return the kind of stored template argument.
An attributed type is a type to which a type attribute has been applied.
pointer(TemplateArgumentLoc Arg)
void setKWLoc(SourceLocation Loc)
TemplateDecl * getCXXDeductionGuideTemplate() const
If this name is the name of a C++ deduction guide, return the template associated with that name...
Call-style initialization (C++98)
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
Represents a type parameter type in Objective C.
void Extend(ASTContext &Context, SourceLocation TemplateKWLoc, TypeLoc TL, SourceLocation ColonColonLoc)
Extend the current nested-name-specifier by another nested-name-specifier component of the form 'type...
VarDecl * getConditionVariable()
Retrieve the variable declared in this "if" statement, if any.
OpenMPScheduleClauseModifier getSecondScheduleModifier() const
Get the second modifier of the clause.
TranslationUnitDecl * getTranslationUnitDecl() const
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
SourceLocation getWhileLoc() const
NestedNameSpecifierLoc getWithLocInContext(ASTContext &Context) const
Retrieve a nested-name-specifier with location information, copied into the given AST context...
ActionResult< Expr * > ExprResult
QualType getUnqualifiedType() const
Retrieve the unqualified variant of the given type, removing as little sugar as possible.
This represents '#pragma omp target parallel' directive.
This represents 'nowait' clause in the '#pragma omp ...' directive.
Represents a C++ struct/union/class.
Represents a template specialization type whose template cannot be resolved, e.g. ...
ContinueStmt - This represents a continue.
SourceLocation getExprLoc() const LLVM_READONLY
OpenMPScheduleClauseModifier getFirstScheduleModifier() const
Get the first modifier of the clause.
Represents a loop initializing the elements of an array.
const TemplateArgumentLoc * operator->() const
This represents 'num_tasks' clause in the '#pragma omp ...' directive.
The template argument is a template name that was provided for a template template parameter...
Stmt * getFallthroughHandler() const
SourceLocation getColonLoc() const
Represents a C array with an unspecified size.
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
Expr * getFilterExpr() const
SourceLocation getAttrLoc() const
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
CXXCatchStmt - This represents a C++ catch block.
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
SourceLocation getRParenLoc() const
OpenMPScheduleClauseKind getScheduleKind() const
Get kind of the clause.
bool isPackExpansion() const
Determines whether this dictionary element is a pack expansion.
OpenMPMapClauseKind
OpenMP mapping kind for 'map' clause.
Qualifiers getQualifiers() const
Retrieve the set of qualifiers applied to this type.
Expr * getOperand() const
ObjCIvarDecl - Represents an ObjC instance variable.
void setParam(unsigned i, ParmVarDecl *VD)
QualType getNamedType() const
Retrieve the type named by the qualified-id.
WhileStmt - This represents a 'while' stmt.
SourceLocation getFirstScheduleModifierLoc() const
Get the first modifier location.
SourceRange getParenOrBraceRange() const
unsigned getNumProtocols() const
helper_expr_const_range reduction_ops() const
void setLParenLoc(SourceLocation Loc)
QualType getReplacementType() const
Gets the type that was substituted for the template parameter.
Location information for a TemplateArgument.
bool isCXXThisCaptured() const
Determine whether the C++ 'this' is captured.
SourceLocation getLParenLoc() const
SourceLocation getAtSynchronizedLoc() const
Expr * getThreadLimit()
Return ThreadLimit number.
QualType getPointerType(QualType T) const
Return the uniqued reference to the type for a pointer to the specified type.
Optional< unsigned > getNumExpansions() const
Determine the number of expansions that will be produced when this pack expansion is instantiated...
void MakeGlobal(ASTContext &Context, SourceLocation ColonColonLoc)
Turn this (empty) nested-name-specifier into the global nested-name-specifier '::'.
CompoundStmt * getTryBlock()
SourceLocation getCaseLoc() const
TypeLoc getTypeLoc() const
For a nested-name-specifier that refers to a type, retrieve the type with source-location information...
SourceLocation getEllipsisLoc() const
Represents Objective-C's @try ... @catch ... @finally statement.
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
bool isGlobalDelete() const
This represents '#pragma omp taskloop simd' directive.
SourceLocation getBuiltinLoc() const
getBuiltinLoc - Return the location of the __builtin_convertvector token.
unsigned getNumCatchStmts() const
Retrieve the number of @catch statements in this try-catch-finally block.
Expr * getBase() const
Retrieve the base object of this member expressions, e.g., the x in x.m.
StringLiteral - This represents a string literal expression, e.g.
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 getNameLoc() const
SourceRange getTypeIdParens() const
Expr * getPattern()
Retrieve the pattern of the pack expansion.
bool HasImplicitReturnType
void setRAngleLoc(SourceLocation Loc)
StringRef getName() const
Get the name of identifier for this declaration as a StringRef.
static Qualifiers fromCVRMask(unsigned CVR)
This represents 'dist_schedule' clause in the '#pragma omp ...' directive.
SourceRange getAttrOperandParensRange() const
The location of the parentheses around the operand, if there is an operand.
bool blockMissingReturnType() const
capture_iterator capture_begin() const
Retrieve an iterator pointing to the first lambda capture.
Stmt * getBody() const
Retrieve the body of the coroutine as written.
unsigned getNumTypeArgs() const
Abstract class common to all of the C++ "named"/"keyword" casts.
unsigned getNumElements() const
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
This represents '#pragma omp sections' directive.
Designation - Represent a full designation, which is a sequence of designators.
Expr * getHint() const
Returns number of threads.
static OpaquePtr make(QualType P)
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
bool isObjectReceiver() const
The top declaration context.
unsigned getNumComponents() const
This represents '#pragma omp target data' directive.
const ParmVarDecl * getParam() const
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
QualType getAsType() const
Retrieve the type for a type template argument.
A reference to a declared variable, function, enum, etc.
Represents an extended address space qualifier where the input address space value is dependent...
Represents a type template specialization; the template must be a class template, a type alias templa...
ArrayRef< ParmVarDecl * > parameters() const
NestedNameSpecifierLoc getQualifierLoc() const
Fetches the nested-name qualifier with source-location information, if one was given.
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
bool isPointerType() const
void setProtocolLAngleLoc(SourceLocation Loc)
Iterator adaptor that invents template argument location information for each of the template argumen...
BreakStmt - This represents a break.
Expr * getChunkSize()
Get chunk size.
const VarDecl * getCatchParamDecl() const
SourceLocation getTemplateNameLoc() const
Expr * getOperand() const
SourceLocation getAttrNameLoc() const
The location of the attribute name, i.e.
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding the member name, if any.
bool isDefaultArgument() const
Determine whether this expression is a default function argument.
Expr * getNumThreads() const
Returns number of threads.
QualType getDependentTemplateSpecializationType(ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, const TemplateArgumentListInfo &Args) const
attr::Kind getAttrKind() const
SourceLocation getBridgeKeywordLoc() const
The location of the bridge keyword.
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.
DeclStmt * getLoopVarStmt()
Wrapper for source info for builtin types.
An l-value expression is a reference to an object with independent storage.
void setRParenLoc(SourceLocation Loc)
unsigned getNumArgs() const
Return the number of arguments to the constructor call.
Wrapper for template type parameters.
static Designator getArray(Expr *Index, SourceLocation LBracketLoc)
const Expr * getBase() const
A trivial tuple used to represent a source range.
This represents '#pragma omp taskyield' directive.
This represents a decl that may have a name.
void setIdentifier(const IdentifierInfo *Id, SourceLocation IdLoc)
Specify that this unqualified-id was parsed as an identifier.
This represents '#pragma omp distribute parallel for simd' composite directive.
A boolean literal, per ([C++ lex.bool] Boolean literals).
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding the member name, if any.
SourceLocation getLParenLoc() const
Returns the location of '('.
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type, member-designator).
T castAs() const
Convert to the specified TypeLoc type, asserting that this TypeLoc is of the desired type...
Represents a C array with a specified size that is not an integer-constant-expression.
Expr * getQueriedExpression() const
This represents '#pragma omp parallel sections' directive.
Represents a C++ namespace alias.
void setTemplateNameLoc(SourceLocation Loc)
SourceLocation getBuiltinLoc() const
NestedNameSpecifierLoc getQualifierLoc() const
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
No keyword precedes the qualified type name.
SourceLocation getRParenLoc() const
Expr * getUnderlyingExpr() const
SourceLocation getAttributeLoc() const
TemplateName getAsTemplate() const
Retrieve the template name for a template name argument.
Expr * getCommon() const
getCommon - Return the common expression, written to the left of the condition.
unsigned getNumTemplateArgs() const
TypeSourceInfo * getWrittenTypeInfo() const
DeclStmt * getBeginStmt()
QualType getElementType() const
void setBlockMissingReturnType(bool val=true)
const ExtParameterInfo * getExtParameterInfosOrNull() const
Return a pointer to the beginning of the array of extra parameter information, if present...
SourceLocation getRightLoc() const
static Designator getArrayRange(Expr *Start, Expr *End, SourceLocation LBracketLoc, SourceLocation EllipsisLoc)
attr::Kind getKind() const
The receiver is a superclass.
SourceLocation getLParenLoc() const
Returns the location of '('.
NamedDecl * getRepresentativeDecl() const
Fetches a representative decl. Useful for lazy diagnostics.
SourceLocation getGenericLoc() const
void getSelectorLocs(SmallVectorImpl< SourceLocation > &SelLocs) const
The global specifier '::'. There is no stored value.
TemplateName getAsTemplateOrTemplatePattern() const
Retrieve the template argument as a template name; if the argument is a pack expansion, return the pattern as a template name.
void pushFullCopy(TypeLoc L)
Pushes a copy of the given TypeLoc onto this builder.
unsigned getNumParams() const
Return the number of parameters this function must have based on its FunctionType.
Wrapper for source info for pointers.
SourceLocation getBegin() const
TypeSourceInfo * getTypeSourceInfo() const
getTypeSourceInfo - Return the destination type.
BinaryOperatorKind getOperator() const
SourceLocation ColonLoc
Location of ':'.
SourceLocation getRParenLoc() const
Return the location of the right parentheses.
SourceLocation getInnerLocStart() const
Return start of source range ignoring outer template declarations.
NamedDecl * getPack() const
Retrieve the parameter pack.
Wrapper for source info for block pointers.
Represents Objective-C's @autoreleasepool Statement.
llvm::Optional< NullabilityKind > getImmediateNullability() const
SourceLocation getKeywordLoc() const
Represents the canonical version of C arrays with a specified constant size.
CompoundStmt * getTryBlock() const
ExceptionSpecInfo ExceptionSpec
QualType getBaseType() const
TemplateArgumentLocContainerIterator()
InitListExpr * getSyntacticForm() const
Expr * getBaseExpr() const
The symbol does not exist.
Represents an implicitly-generated value initialization of an object of a given type.
CompoundStmt * getBlock() const
SourceLocation getReturnLoc() const
Stmt * getFinalSuspendStmt() const
void setElaboratedKeywordLoc(SourceLocation Loc)
CapturedRegionKind getCapturedRegionKind() const
Retrieve the captured region kind.
This represents '#pragma omp target parallel for' directive.
Attr - This represents one attribute.
SourceLocation getLocation() const
This represents clause 'use_device_ptr' in the '#pragma omp ...' directives.
SourceLocation getTypeArgsRAngleLoc() const
QualType getPointeeType() const
QualType getType() const
Return the type wrapped by this type source info.
TypeTrait getTrait() const
Determine which type trait this expression uses.
Expr * getLength()
Get length of array section.
void setUnderlyingTInfo(TypeSourceInfo *TI) const
const DeclarationNameInfo & getMemberNameInfo() const
Retrieve the name of the member that this expression refers to.
const IdentifierInfo * getIdentifier() const
Expr * getSizeExpr() const
bool isCXXInstanceMember() const
Determine whether the given declaration is an instance member of a C++ class.
ConstructionKind getConstructionKind() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
TypeSourceInfo * getClassReceiverTypeInfo() const
Returns a type-source information of a class message send, or nullptr if the message is not a class m...
Expr * getBase()
An array section can be written only as Base[LowerBound:Length].
Qualifiers::ObjCLifetime getObjCLifetime() const
Returns lifetime attribute of this type.
This represents '#pragma omp taskloop' directive.