On 1/30/20 9:43 AM, Iain Sandoe wrote:
Hi Nathan,

however. ….
also, what if you find something, but it's not a type template?

… I’ve switched the complain off on lookup_qualified_name and now check for
a type template.

I'm not sure that's helpful. I think you should still complain on the lookup. If that returns error_mark_node, you're done. If it returns NULL, does it emit an error? If not, you should emit a not found error. Finally, if it does return a thing, check if it's a class template decl (or alias template I guess -- DECL_TEMPLATE_RESULT being a TYPE_DECL is close enough) and if not, error on that (X is not a template class). Then the user's fully clued in.

I took the liberty of repeating this treatment in the coroutine handle lookup 
code
(new testcases attached).

so the errors now look like:

"cannot find a valid coroutine traits template using 'std::coroutine_traits’”

hm, 'valid'. If you find a template_decl, but cannot instantiate it, that sounds not valid. But I suspect you do not diagnose that here, because in general you cannot :)

sorry to be a pain.

nathan
--
Nathan Sidwell

Reply via email to