13#ifndef LLVM_CLANG_LIB_SEMA_TREETRANSFORM_H
14#define LLVM_CLANG_LIB_SEMA_TREETRANSFORM_H
47#include "llvm/ADT/ArrayRef.h"
48#include "llvm/Support/ErrorHandling.h"
52using namespace llvm::omp;
108template<
typename Derived>
113 class ForgetPartiallySubstitutedPackRAII {
118 ForgetPartiallySubstitutedPackRAII(Derived &Self) : Self(Self) {
119 Old = Self.ForgetPartiallySubstitutedPack();
122 ~ForgetPartiallySubstitutedPackRAII() {
123 Self.RememberPartiallySubstitutedPack(Old);
140 Derived &
getDerived() {
return static_cast<Derived&
>(*this); }
144 return static_cast<const Derived&
>(*this);
209 OldLocation = Self.getDerived().getBaseLocation();
210 OldEntity = Self.getDerived().getBaseEntity();
213 Self.getDerived().setBase(Location, Entity);
217 Self.getDerived().setBase(OldLocation, OldEntity);
247 return E->isDefaultArgument();
290 bool &ShouldExpand,
bool &RetainExpansion,
291 std::optional<unsigned> &NumExpansions) {
292 ShouldExpand =
false;
407 const X##Attr *Transform##X##Attr(const X##Attr *R) { return R; }
408#include "clang/Basic/AttrList.inc"
418 const X##Attr *TransformStmt##X##Attr(const Stmt *, const Stmt *, \
419 const X##Attr *A) { \
420 return getDerived().Transform##X##Attr(A); \
422#include "clang/Basic/AttrList.inc"
468 bool *ArgChanged =
nullptr);
477 llvm::DenseMap<Decl *, Decl *>::iterator Known
480 return Known->second;
508 assert(New.size() == 1 &&
509 "must override transformedLocalDecl if performing pack expansion");
547 NamedDecl *FirstQualifierInScope =
nullptr);
592 NamedDecl *FirstQualifierInScope =
nullptr,
593 bool AllowInjectedClassName =
false);
605 bool Uneval =
false);
628 bool Uneval =
false) {
647 template<
typename InputIterator>
651 bool Uneval =
false);
663#define ABSTRACT_TYPELOC(CLASS, PARENT)
664#define TYPELOC(CLASS, PARENT) \
665 QualType Transform##CLASS##Type(TypeLocBuilder &TLB, CLASS##TypeLoc T);
666#include "clang/AST/TypeLocNodes.def"
670 bool SuppressObjCLifetime);
674 bool SuppressObjCLifetime);
676 template<
typename Fn>
683 template <
typename Fn>
685 Fn TransformModifiedType);
733 return getDerived().TransformFunctionTypeParams(
734 Loc, Params, ParamTypes, ParamInfos, PTypes, PVars, PInfos,
nullptr);
752 KWLoc, Params,
nullptr,
753 nullptr, PTypes, &TransParams, PInfos))
766 std::optional<unsigned> NumExpansions,
767 bool ExpectParameterPack);
794 bool IsAddressOfOperand,
802 bool IsAddressOfOperand);
810#define STMT(Node, Parent) \
811 LLVM_ATTRIBUTE_NOINLINE \
812 StmtResult Transform##Node(Node *S);
813#define VALUESTMT(Node, Parent) \
814 LLVM_ATTRIBUTE_NOINLINE \
815 StmtResult Transform##Node(Node *S, StmtDiscardKind SDK);
816#define EXPR(Node, Parent) \
817 LLVM_ATTRIBUTE_NOINLINE \
818 ExprResult Transform##Node(Node *E);
819#define ABSTRACT_STMT(Stmt)
820#include "clang/AST/StmtNodes.inc"
822#define GEN_CLANG_CLAUSE_CLASS
823#define CLAUSE_CLASS(Enum, Str, Class) \
824 LLVM_ATTRIBUTE_NOINLINE \
825 OMPClause *Transform##Class(Class *S);
826#include "llvm/Frontend/OpenMP/OMP.inc"
903 const llvm::APInt *Size,
Expr *SizeExpr,
904 unsigned IndexTypeQuals,
SourceRange BracketsRange);
913 const llvm::APInt &Size,
Expr *SizeExpr,
914 unsigned IndexTypeQuals,
924 unsigned IndexTypeQuals,
934 unsigned IndexTypeQuals,
945 unsigned IndexTypeQuals,
983 unsigned NumColumns);
1000 Expr *AddrSpaceExpr,
1070 bool FullySubstituted,
1084 TypeConstraintConcept,
1085 TypeConstraintArgs);
1093 Template, Deduced,
false);
1139 bool AllowInjectedClassName) {
1143 SS.
Adopt(QualifierLoc);
1145 SS, TemplateKWLoc, *Name, NameLoc,
QualType(),
nullptr,
1146 AllowInjectedClassName);
1160 getDerived().RebuildTemplateSpecializationType(InstName, NameLoc, Args);
1177 bool DeducedTSTContext) {
1179 SS.
Adopt(QualifierLoc);
1192 *
Id, IdLoc, DeducedTSTContext);
1210 switch (
Result.getResultKind()) {
1221 llvm_unreachable(
"Tag lookup cannot find non-tags");
1233 switch (
Result.getResultKind()) {
1239 SemaRef.
Diag(IdLoc, diag::err_tag_reference_non_tag)
1240 << SomeDecl << NTK << llvm::to_underlying(Kind);
1246 << llvm::to_underlying(Kind) <<
Id << DC
1255 SemaRef.
Diag(KeywordLoc, diag::err_use_with_wrong_tag) <<
Id;
1256 SemaRef.
Diag(Tag->getLocation(), diag::note_previous_use);
1273 std::optional<unsigned> NumExpansions) {
1318 bool AllowInjectedClassName);
1331 bool AllowInjectedClassName);
1341 Decl *AssociatedDecl,
unsigned Index,
1344 ArgPack, AssociatedDecl, Index, Final);
1422 Then, ElseLoc, Else);
1476 Inc, RParenLoc, Body);
1521 bool IsVolatile,
unsigned NumOutputs,
1528 NumInputs, Names, Constraints, Exprs,
1529 AsmString, Clobbers, NumLabels, RParenLoc);
1538 StringRef AsmString,
1539 unsigned NumOutputs,
unsigned NumInputs,
1545 NumOutputs, NumInputs,
1546 Constraints, Clobbers, Exprs, EndLoc);
1575 CoawaitLoc, Operand, OpCoawaitLookup);
1579 Suspend.
get(),
true);
1680 Kind, DirName, CancelRegion, Clauses, AStmt, StartLoc, EndLoc);
1692 Kind, DirName, Clauses, AStmt, StartLoc, EndLoc);
1706 NameModifier,
Condition, StartLoc, LParenLoc, NameModifierLoc, ColonLoc,
1808 Kind, KindKwLoc, StartLoc, LParenLoc, EndLoc);
1821 Kind, KindKwLoc, StartLoc, LParenLoc, EndLoc);
1834 M1, M2, Kind, ChunkSize, StartLoc, LParenLoc, M1Loc, M2Loc, KindLoc,
1885 VarList, LPKind, LPKindLoc, ColonLoc, StartLoc, LParenLoc, EndLoc);
1912 VarList, Modifier, StartLoc, LParenLoc, ModifierLoc, ColonLoc, EndLoc,
1913 ReductionIdScopeSpec, ReductionId, UnresolvedReductions);
1927 VarList, StartLoc, LParenLoc, ColonLoc, EndLoc, ReductionIdScopeSpec,
1928 ReductionId, UnresolvedReductions);
1943 VarList, StartLoc, LParenLoc, ColonLoc, EndLoc, ReductionIdScopeSpec,
1944 ReductionId, UnresolvedReductions);
1957 VarList, Step, StartLoc, LParenLoc, Modifier, ModifierLoc, ColonLoc,
1958 StepModifierLoc, EndLoc);
1971 VarList, Alignment, StartLoc, LParenLoc, ColonLoc, EndLoc);
2031 Data, DepModifier, VarList, StartLoc, LParenLoc, EndLoc);
2044 Modifier,
Device, StartLoc, LParenLoc, ModifierLoc, EndLoc);
2059 IteratorModifier, MapTypeModifiers, MapTypeModifiersLoc,
2060 MapperIdScopeSpec, MapperId, MapType, IsMapTypeImplicit, MapLoc,
2061 ColonLoc, VarList, Locs,
2062 false, UnresolvedMappers);
2075 Allocate, VarList, StartLoc, LParenLoc, ColonLoc, EndLoc);
2123 Modifier,
Device, StartLoc, LParenLoc, ModifierLoc, EndLoc);
2136 Modifier, NumTasks, StartLoc, LParenLoc, ModifierLoc, EndLoc);
2171 Kind, ChunkSize, StartLoc, LParenLoc, KindLoc, CommaLoc, EndLoc);
2186 MotionModifiers, MotionModifiersLoc, MapperIdScopeSpec, MapperId,
2187 ColonLoc, VarList, Locs, UnresolvedMappers);
2202 MotionModifiers, MotionModifiersLoc, MapperIdScopeSpec, MapperId,
2203 ColonLoc, VarList, Locs, UnresolvedMappers);
2254 M, Kind, StartLoc, LParenLoc, MLoc, KindLoc, EndLoc);
2301 StartLoc, LParenLoc, EndLoc,
Data);
2314 StartLoc, LParenLoc, ColonLoc, EndLoc, Modifier, Locators);
2326 Modifier, Kind, StartLoc, LParenLoc, ModifierKwLoc, KindKwLoc, EndLoc);
2339 InteropVar, InteropInfo, StartLoc, LParenLoc, VarLoc, EndLoc);
2350 LParenLoc, VarLoc, EndLoc);
2362 InteropVar, StartLoc, LParenLoc, VarLoc, EndLoc);
2501 DepType, DepLoc, ColonLoc, VarList, StartLoc, LParenLoc, EndLoc);
2549 ForLoc, Element, Collection, RParenLoc);
2567 StartLoc, IdLoc,
Id);
2605 if (RangeStmt->isSingleDecl()) {
2606 if (
VarDecl *RangeVar = dyn_cast<VarDecl>(RangeStmt->getSingleDecl())) {
2607 if (RangeVar->isInvalidDecl())
2610 Expr *RangeExpr = RangeVar->getInit();
2617 diag::err_objc_for_range_init_stmt)
2618 <<
Init->getSourceRange();
2621 ForLoc, LoopVar, RangeExpr, RParenLoc);
2628 ForLoc, CoawaitLoc,
Init, ColonLoc,
Range,
Begin, End, Cond, Inc,
2642 QualifierLoc, NameInfo, Nested);
2704 SS.
Adopt(QualifierLoc);
2816 if (IsOMPArraySection)
2818 Base, LBracketLoc, LowerBound, ColonLocFirst, ColonLocSecond, Length,
2819 Stride, RBracketLoc);
2821 assert(Stride ==
nullptr && !ColonLocSecond.
isValid() &&
2822 "Stride/second colon not allowed for OpenACC");
2825 Base, LBracketLoc, LowerBound, ColonLocFirst, Length, RBracketLoc);
2837 Base, LParenLoc, RParenLoc, Dims, BracketsRanges);
2849 nullptr, IteratorKwLoc, LLoc, RLoc,
Data);
2859 Expr *ExecConfig =
nullptr) {
2861 nullptr, Callee, LParenLoc, Args, RParenLoc, ExecConfig);
2868 nullptr, Callee, LParenLoc, Args, RParenLoc);
2886 if (!
Member->getDeclName()) {
2890 assert(
Member->getType()->isRecordType() &&
2891 "unnamed member not of record type?");
2904 if (!isArrow &&
Base->isPRValue()) {
2913 Base, isArrow, OpLoc, EmptySS, cast<FieldDecl>(
Member),
2919 SS.
Adopt(QualifierLoc);
2922 if (
Base->containsErrors())
2936 if (
getSema().isUnevaluatedContext() &&
Base->isImplicitCXXThis() &&
2937 isa<FieldDecl, IndirectFieldDecl, MSPropertyDecl>(
Member)) {
2938 if (
auto *ThisClass = cast<CXXThisExpr>(
Base)
2941 ->getAsCXXRecordDecl()) {
2942 auto *
Class = cast<CXXRecordDecl>(
Member->getDeclContext());
2945 if (!ThisClass->Equals(
Class) && !ThisClass->isDerivedFrom(
Class))
2953 FirstQualifierInScope,
2954 R, ExplicitTemplateArgs,
3132 Expr *ControllingExpr,
3137 ControllingExpr, Types, Exprs);
3152 ControllingType, Types, Exprs);
3185 case Stmt::CXXStaticCastExprClass:
3186 return getDerived().RebuildCXXStaticCastExpr(OpLoc, LAngleLoc, TInfo,
3187 RAngleLoc, LParenLoc,
3188 SubExpr, RParenLoc);
3190 case Stmt::CXXDynamicCastExprClass:
3191 return getDerived().RebuildCXXDynamicCastExpr(OpLoc, LAngleLoc, TInfo,
3192 RAngleLoc, LParenLoc,
3193 SubExpr, RParenLoc);
3195 case Stmt::CXXReinterpretCastExprClass:
3196 return getDerived().RebuildCXXReinterpretCastExpr(OpLoc, LAngleLoc, TInfo,
3197 RAngleLoc, LParenLoc,
3201 case Stmt::CXXConstCastExprClass:
3202 return getDerived().RebuildCXXConstCastExpr(OpLoc, LAngleLoc, TInfo,
3203 RAngleLoc, LParenLoc,
3204 SubExpr, RParenLoc);
3206 case Stmt::CXXAddrspaceCastExprClass:
3207 return getDerived().RebuildCXXAddrspaceCastExpr(
3208 OpLoc, LAngleLoc, TInfo, RAngleLoc, LParenLoc, SubExpr, RParenLoc);
3211 llvm_unreachable(
"Invalid C++ named cast");
3289 OpLoc, tok::kw_addrspace_cast, TInfo, SubExpr,
3301 bool ListInitialization) {
3305 if (
auto *PLE = dyn_cast<ParenListExpr>(Sub))
3307 TInfo, LParenLoc,
MultiExprArg(PLE->getExprs(), PLE->getNumExprs()),
3308 RParenLoc, ListInitialization);
3311 ListInitialization);
3375 if (
getSema().CheckCXXThisType(ThisLoc, ThisType))
3385 bool IsThrownVariableInScope) {
3395 Expr *RewrittenExpr) {
3397 RewrittenExpr,
getSema().CurContext);
3432 std::optional<Expr *> ArraySize,
3451 bool IsGlobalDelete,
3502 bool IsAddressOfOperand,
3505 SS.
Adopt(QualifierLoc);
3507 if (TemplateArgs || TemplateKWLoc.
isValid())
3509 SS, TemplateKWLoc, NameInfo, TemplateArgs, IsAddressOfOperand);
3512 SS, NameInfo, IsAddressOfOperand, RecoveryTSI);
3534 bool IsElidable,
MultiExprArg Args,
bool HadMultipleCandidates,
3535 bool ListInitialization,
bool StdInitListInitialization,
3541 if (Constructor->isInheritingConstructor())
3542 FoundCtor = Constructor->getInheritedConstructor().getConstructor();
3545 if (
getSema().CompleteConstructorCall(FoundCtor,
T, Args,
Loc,
3552 HadMultipleCandidates,
3554 StdInitListInitialization,
3555 RequiresZeroInit, ConstructKind,
3563 bool ConstructsVBase,
3564 bool InheritedFromVBase) {
3566 Loc,
T, Constructor, ConstructsVBase, InheritedFromVBase);
3577 bool ListInitialization) {
3579 TSInfo, LParenOrBraceLoc, Args, RParenOrBraceLoc, ListInitialization);
3590 bool ListInitialization) {
3592 RParenLoc, ListInitialization);
3609 SS.
Adopt(QualifierLoc);
3612 OperatorLoc, IsArrow,
3614 FirstQualifierInScope,
3616 TemplateArgs,
nullptr);
3632 SS.
Adopt(QualifierLoc);
3635 OperatorLoc, IsArrow,
3637 FirstQualifierInScope,
3638 R, TemplateArgs,
nullptr);
3653 std::optional<unsigned> Length,
3656 RParenLoc, Length, PartialArgs);
3661 Expr *PackIdExpression,
Expr *IndexExpr,
3663 bool EmptyPack =
false) {
3665 IndexExpr, RSquareLoc, ExpandedExprs,
3695 NamedConcept, TALI);
3713 LocalParameters, RParenLoc, Requirements,
3767 Expr **Elements,
unsigned NumElements) {
3777 RB,
Base, Key, getterMethod, setterMethod);
3809 ReceiverTypeInfo, ReceiverTypeInfo->
getType(),
3824 Sel, Method, LBracLoc,
3825 SelectorLocs, RBracLoc, Args);
3839 nullptr, SuperType, SuperLoc, Sel, Method, LBracLoc,
3840 SelectorLocs, RBracLoc, Args)
3842 Sel, Method, LBracLoc,
3843 SelectorLocs, RBracLoc, Args);
3852 bool IsArrow,
bool IsFreeIvar) {
3861 if (IsFreeIvar &&
Result.isUsable())
3862 cast<ObjCIvarRefExpr>(
Result.get())->setIsFreeIvar(IsFreeIvar);
3898 PropertyLoc,
Base));
3930 assert(!Lookup.
empty() &&
"No __builtin_shufflevector?");
3939 CK_BuiltinFnToFnPtr).
get();
3965 std::optional<unsigned> NumExpansions) {
3970 EllipsisLoc, NumExpansions);
3992 llvm_unreachable(
"Pack expansion pattern has no parameter packs");
4013 std::optional<unsigned> NumExpansions) {
4026 std::optional<unsigned> NumExpansions) {
4028 EllipsisLoc, RHS, RParenLoc,
4037 Init->containsUnexpandedParameterPack();
4038 else if (PVD->hasUninstantiatedDefaultArg())
4040 PVD->getUninstantiatedDefaultArg()
4041 ->containsUnexpandedParameterPack();
4081 EndLoc, Clauses, StrBlock);
4110 bool DeducibleTSTContext);
4122template <
typename Derived>
4127 switch (S->getStmtClass()) {
4132#define STMT(Node, Parent) \
4133 case Stmt::Node##Class: return getDerived().Transform##Node(cast<Node>(S));
4134#define VALUESTMT(Node, Parent) \
4135 case Stmt::Node##Class: \
4136 return getDerived().Transform##Node(cast<Node>(S), SDK);
4137#define ABSTRACT_STMT(Node)
4138#define EXPR(Node, Parent)
4139#include "clang/AST/StmtNodes.inc"
4142#define STMT(Node, Parent)
4143#define ABSTRACT_STMT(Stmt)
4144#define EXPR(Node, Parent) case Stmt::Node##Class:
4145#include "clang/AST/StmtNodes.inc"
4147 ExprResult E = getDerived().TransformExpr(cast<Expr>(S));
4149 if (SDK == SDK_StmtExprResult)
4150 E = getSema().ActOnStmtExprResult(
E);
4151 return getSema().ActOnExprStmt(
E, SDK == SDK_Discarded);
4158template<
typename Derived>
4163 switch (S->getClauseKind()) {
4166#define GEN_CLANG_CLAUSE_CLASS
4167#define CLAUSE_CLASS(Enum, Str, Class) \
4169 return getDerived().Transform##Class(cast<Class>(S));
4170#include "llvm/Frontend/OpenMP/OMP.inc"
4177template<
typename Derived>
4184#define STMT(Node, Parent) case Stmt::Node##Class: break;
4185#define ABSTRACT_STMT(Stmt)
4186#define EXPR(Node, Parent) \
4187 case Stmt::Node##Class: return getDerived().Transform##Node(cast<Node>(E));
4188#include "clang/AST/StmtNodes.inc"
4194template<
typename Derived>
4202 if (
auto *FE = dyn_cast<FullExpr>(
Init))
4203 Init = FE->getSubExpr();
4205 if (
auto *AIL = dyn_cast<ArrayInitLoopExpr>(
Init)) {
4211 Init = MTE->getSubExpr();
4214 Init = Binder->getSubExpr();
4217 Init = ICE->getSubExprAsWritten();
4220 dyn_cast<CXXStdInitializerListExpr>(
Init))
4221 return TransformInitializer(ILE->getSubExpr(), NotCopyInit);
4228 return getDerived().TransformExpr(
Init);
4233 return getDerived().RebuildParenListExpr(
Parens.getBegin(), std::nullopt,
4238 if (isa<ImplicitValueInitExpr>(
Init))
4239 return getDerived().RebuildParenListExpr(
SourceLocation(), std::nullopt,
4244 if (!Construct || isa<CXXTemporaryObjectExpr>(Construct))
4245 return getDerived().TransformExpr(
Init);
4250 return TransformInitializer(Construct->
getArg(0), NotCopyInit);
4257 getSema().keepInLifetimeExtendingContext();
4259 bool ArgChanged =
false;
4261 true, NewArgs, &ArgChanged))
4266 return getDerived().RebuildInitList(Construct->
getBeginLoc(), NewArgs,
4271 if (
Parens.isInvalid()) {
4274 assert(NewArgs.empty() &&
4275 "no parens or braces but have direct init with arguments?");
4278 return getDerived().RebuildParenListExpr(
Parens.getBegin(), NewArgs,
4282template<
typename Derived>
4288 for (
unsigned I = 0; I != NumInputs; ++I) {
4290 if (IsCall && getDerived().DropCallArgument(Inputs[I])) {
4298 Expr *Pattern = Expansion->getPattern();
4301 getSema().collectUnexpandedParameterPacks(Pattern, Unexpanded);
4302 assert(!Unexpanded.empty() &&
"Pack expansion without parameter packs?");
4307 bool RetainExpansion =
false;
4308 std::optional<unsigned> OrigNumExpansions = Expansion->getNumExpansions();
4309 std::optional<unsigned> NumExpansions = OrigNumExpansions;
4310 if (getDerived().TryExpandParameterPacks(Expansion->getEllipsisLoc(),
4313 Expand, RetainExpansion,
4322 ExprResult OutPattern = getDerived().TransformExpr(Pattern);
4326 ExprResult Out = getDerived().RebuildPackExpansion(OutPattern.
get(),
4327 Expansion->getEllipsisLoc(),
4329 if (Out.isInvalid())
4334 Outputs.push_back(Out.get());
4340 if (ArgChanged) *ArgChanged =
true;
4344 for (
unsigned I = 0; I != *NumExpansions; ++I) {
4346 ExprResult Out = getDerived().TransformExpr(Pattern);
4347 if (Out.isInvalid())
4350 if (Out.get()->containsUnexpandedParameterPack()) {
4351 Out = getDerived().RebuildPackExpansion(
4352 Out.get(), Expansion->getEllipsisLoc(), OrigNumExpansions);
4353 if (Out.isInvalid())
4357 Outputs.push_back(Out.get());
4362 if (RetainExpansion) {
4363 ForgetPartiallySubstitutedPackRAII Forget(getDerived());
4365 ExprResult Out = getDerived().TransformExpr(Pattern);
4366 if (Out.isInvalid())
4369 Out = getDerived().RebuildPackExpansion(
4370 Out.get(), Expansion->getEllipsisLoc(), OrigNumExpansions);
4371 if (Out.isInvalid())
4374 Outputs.push_back(Out.get());
4381 IsCall ? getDerived().TransformInitializer(Inputs[I],
false)
4382 : getDerived().TransformExpr(Inputs[I]);
4386 if (
Result.get() != Inputs[I] && ArgChanged)
4389 Outputs.push_back(
Result.get());
4395template <
typename Derived>
4399 VarDecl *ConditionVar = cast_or_null<VarDecl>(
4400 getDerived().TransformDefinition(Var->
getLocation(), Var));
4405 return getSema().ActOnConditionVariable(ConditionVar,
Loc, Kind);
4414 return getSema().ActOnCondition(
nullptr,
Loc, CondExpr.
get(), Kind,
4421template <
typename Derived>
4429 Qualifier = Qualifier.getPrefix())
4445 SS, FirstQualifierInScope,
false))
4452 cast_or_null<NamespaceDecl>(getDerived().TransformDecl(
4460 cast_or_null<NamespaceAliasDecl>(getDerived().TransformDecl(
4475 cast_or_null<CXXRecordDecl>(getDerived().TransformDecl(
4484 FirstQualifierInScope, SS);
4494 diag::warn_cxx98_compat_enum_nested_name_spec);
4497 SS.
Adopt(ETL.getQualifierLoc());
4498 TL = ETL.getNamedTypeLoc();
4517 FirstQualifierInScope =
nullptr;
4523 !getDerived().AlwaysRebuild())
4536template<
typename Derived>
4544 switch (Name.getNameKind()) {
4555 TemplateDecl *OldTemplate = Name.getCXXDeductionGuideTemplate();
4556 TemplateDecl *NewTemplate = cast_or_null<TemplateDecl>(
4557 getDerived().TransformDecl(NameInfo.
getLoc(), OldTemplate));
4573 NewTInfo = getDerived().TransformType(OldTInfo);
4581 QualType NewT = getDerived().TransformType(Name.getCXXNameType());
4597 llvm_unreachable(
"Unknown name kind.");
4600template<
typename Derived>