Simplify. NFC.

llvm-svn: 281315
This commit is contained in:
Vassil Vassilev 2016-09-13 10:36:12 +00:00
parent 3e4bc66134
commit e5fe5e98e5
2 changed files with 4 additions and 4 deletions

View File

@ -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);
}

View File

@ -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(