mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 00:16:05 +00:00
Inform the consumer on invalid template instantiations.
Some clients which want to track state need the information whether a template was instantiated and made invalid. Differential revision: https://reviews.llvm.org/D92248
This commit is contained in:
parent
84d5768d97
commit
02eb8e20b5
@ -2846,8 +2846,6 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation,
|
||||
SavedContext.pop();
|
||||
|
||||
if (!Instantiation->isInvalidDecl()) {
|
||||
Consumer.HandleTagDeclDefinition(Instantiation);
|
||||
|
||||
// Always emit the vtable for an explicit instantiation definition
|
||||
// of a polymorphic class template specialization. Otherwise, eagerly
|
||||
// instantiate only constexpr virtual functions in preparation for their use
|
||||
@ -2859,6 +2857,8 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation,
|
||||
/*ConstexprOnly*/ true);
|
||||
}
|
||||
|
||||
Consumer.HandleTagDeclDefinition(Instantiation);
|
||||
|
||||
return Instantiation->isInvalidDecl();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user