forked from OSchip/llvm-project
More cleanup after removing the ability to reference a dependent
VarTemplateSpecializationDecl.
This commit is contained in:
parent
8d91ce8f58
commit
a4ca710d9c
|
@ -17925,8 +17925,6 @@ static void DoMarkVarDeclReferenced(Sema &SemaRef, SourceLocation Loc,
|
|||
bool NeedDefinition =
|
||||
OdrUse == OdrUseContext::Used || NeededForConstantEvaluation;
|
||||
|
||||
VarTemplateSpecializationDecl *VarSpec =
|
||||
dyn_cast<VarTemplateSpecializationDecl>(Var);
|
||||
assert(!isa<VarTemplatePartialSpecializationDecl>(Var) &&
|
||||
"Can't instantiate a partial template specialization.");
|
||||
|
||||
|
@ -17961,14 +17959,6 @@ static void DoMarkVarDeclReferenced(Sema &SemaRef, SourceLocation Loc,
|
|||
Var->setTemplateSpecializationKind(TSK, PointOfInstantiation);
|
||||
}
|
||||
|
||||
bool InstantiationDependent = false;
|
||||
bool IsNonDependent =
|
||||
VarSpec ? !TemplateSpecializationType::anyDependentTemplateArguments(
|
||||
VarSpec->getTemplateArgsInfo(), InstantiationDependent)
|
||||
: true;
|
||||
|
||||
// Do not instantiate specializations that are still type-dependent.
|
||||
if (IsNonDependent) {
|
||||
if (UsableInConstantExpr) {
|
||||
// Do not defer instantiations of variables that could be used in a
|
||||
// constant expression.
|
||||
|
@ -17987,7 +17977,6 @@ static void DoMarkVarDeclReferenced(Sema &SemaRef, SourceLocation Loc,
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// C++2a [basic.def.odr]p4:
|
||||
// A variable x whose name appears as a potentially-evaluated expression e
|
||||
|
|
Loading…
Reference in New Issue