aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaTemplateDeductionGuide.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaTemplateDeductionGuide.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplateDeductionGuide.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/clang/lib/Sema/SemaTemplateDeductionGuide.cpp b/clang/lib/Sema/SemaTemplateDeductionGuide.cpp
index bfcd397..40811d4 100644
--- a/clang/lib/Sema/SemaTemplateDeductionGuide.cpp
+++ b/clang/lib/Sema/SemaTemplateDeductionGuide.cpp
@@ -632,34 +632,34 @@ private:
ParmVarDecl *OldParam, MultiLevelTemplateArgumentList &Args,
llvm::SmallVectorImpl<TypedefNameDecl *> &MaterializedTypedefs,
bool TransformingOuterPatterns) {
- TypeSourceInfo *OldDI = OldParam->getTypeSourceInfo();
- TypeSourceInfo *NewDI;
- if (auto PackTL = OldDI->getTypeLoc().getAs<PackExpansionTypeLoc>()) {
+ TypeSourceInfo *OldTSI = OldParam->getTypeSourceInfo();
+ TypeSourceInfo *NewTSI;
+ if (auto PackTL = OldTSI->getTypeLoc().getAs<PackExpansionTypeLoc>()) {
// Expand out the one and only element in each inner pack.
Sema::ArgPackSubstIndexRAII SubstIndex(SemaRef, 0u);
- NewDI =
+ NewTSI =
SemaRef.SubstType(PackTL.getPatternLoc(), Args,
OldParam->getLocation(), OldParam->getDeclName());
- if (!NewDI)
+ if (!NewTSI)
return nullptr;
- NewDI =
- SemaRef.CheckPackExpansion(NewDI, PackTL.getEllipsisLoc(),
+ NewTSI =
+ SemaRef.CheckPackExpansion(NewTSI, PackTL.getEllipsisLoc(),
PackTL.getTypePtr()->getNumExpansions());
} else
- NewDI = SemaRef.SubstType(OldDI, Args, OldParam->getLocation(),
- OldParam->getDeclName());
- if (!NewDI)
+ NewTSI = SemaRef.SubstType(OldTSI, Args, OldParam->getLocation(),
+ OldParam->getDeclName());
+ if (!NewTSI)
return nullptr;
// Extract the type. This (for instance) replaces references to typedef
// members of the current instantiations with the definitions of those
// typedefs, avoiding triggering instantiation of the deduced type during
// deduction.
- NewDI = ExtractTypeForDeductionGuide(
- SemaRef, MaterializedTypedefs, NestedPattern,
- TransformingOuterPatterns ? &Args : nullptr)
- .transform(NewDI);
- if (!NewDI)
+ NewTSI = ExtractTypeForDeductionGuide(
+ SemaRef, MaterializedTypedefs, NestedPattern,
+ TransformingOuterPatterns ? &Args : nullptr)
+ .transform(NewTSI);
+ if (!NewTSI)
return nullptr;
// Resolving a wording defect, we also inherit default arguments from the
// constructor.
@@ -667,7 +667,7 @@ private:
if (OldParam->hasDefaultArg()) {
// We don't care what the value is (we won't use it); just create a
// placeholder to indicate there is a default argument.
- QualType ParamTy = NewDI->getType();
+ QualType ParamTy = NewTSI->getType();
NewDefArg = new (SemaRef.Context)
OpaqueValueExpr(OldParam->getDefaultArgRange().getBegin(),
ParamTy.getNonLValueExprType(SemaRef.Context),
@@ -676,13 +676,13 @@ private:
: VK_PRValue);
}
// Handle arrays and functions decay.
- auto NewType = NewDI->getType();
+ auto NewType = NewTSI->getType();
if (NewType->isArrayType() || NewType->isFunctionType())
NewType = SemaRef.Context.getDecayedType(NewType);
ParmVarDecl *NewParam = ParmVarDecl::Create(
SemaRef.Context, DC, OldParam->getInnerLocStart(),
- OldParam->getLocation(), OldParam->getIdentifier(), NewType, NewDI,
+ OldParam->getLocation(), OldParam->getIdentifier(), NewType, NewTSI,
OldParam->getStorageClass(), NewDefArg.get());
NewParam->setScopeInfo(OldParam->getFunctionScopeDepth(),
OldParam->getFunctionScopeIndex());