forked from OSchip/llvm-project
parent
3e4bc66134
commit
e5fe5e98e5
|
@ -1339,7 +1339,7 @@ Module *Sema::getOwningModule(Decl *Entity) {
|
|||
// instance, maybe this is a lazily-declared special member of an imported
|
||||
// class).
|
||||
auto *Parent = cast<NamedDecl>(Entity->getDeclContext());
|
||||
assert(Parent->isHidden() && "unexpectedly hidden decl");
|
||||
assert(!Parent->isHidden() && "unexpectedly hidden decl");
|
||||
return getOwningModule(Parent);
|
||||
}
|
||||
|
||||
|
|
|
@ -4125,17 +4125,17 @@ void Sema::InstantiateVariableDefinition(SourceLocation PointOfInstantiation,
|
|||
// unit.
|
||||
if (!Def) {
|
||||
if (DefinitionRequired) {
|
||||
if (VarSpec)
|
||||
if (VarSpec) {
|
||||
Diag(PointOfInstantiation,
|
||||
diag::err_explicit_instantiation_undefined_var_template) << Var;
|
||||
Var->setInvalidDecl();
|
||||
}
|
||||
else
|
||||
Diag(PointOfInstantiation,
|
||||
diag::err_explicit_instantiation_undefined_member)
|
||||
<< 2 << Var->getDeclName() << Var->getDeclContext();
|
||||
Diag(PatternDecl->getLocation(),
|
||||
diag::note_explicit_instantiation_here);
|
||||
if (VarSpec)
|
||||
Var->setInvalidDecl();
|
||||
} else if (Var->getTemplateSpecializationKind()
|
||||
== TSK_ExplicitInstantiationDefinition) {
|
||||
PendingInstantiations.push_back(
|
||||
|
|
Loading…
Reference in New Issue