================
@@ -2535,7 +2535,8 @@ Decl 
*TemplateDeclInstantiator::VisitVarTemplatePartialSpecializationDecl(
 
   // Lookup the already-instantiated declaration and return that.
   DeclContext::lookup_result Found = Owner->lookup(VarTemplate->getDeclName());
-  assert(!Found.empty() && "Instantiation found nothing?");
+  if (Found.empty())
----------------
hbatagelo wrote:

Maybe the invariant is for well-formed code only?

We can keep the assertion by bailing out a bit early if the primary template is 
invalid. I'll push an updated version.

https://github.com/llvm/llvm-project/pull/202006
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to