Previously, clang marked a decl as invalid without emitting a diagnostic. This lead to an assert in CodeGen for the attached test case.
rdar://41806724
Thanks for taking a look!
Erik
Differential D49085
[Sema] Emit a diagnostic for an invalid dependent function template specialization erik.pilkington on Jul 9 2018, 9:42 AM. Authored by
Details Previously, clang marked a decl as invalid without emitting a diagnostic. This lead to an assert in CodeGen for the attached test case. rdar://41806724 Thanks for taking a look!
Diff Detail Event TimelineComment Actions This is the right basic approach. I think it would be better if the diagnostic text was more like err_function_template_spec_no_match, maybe "no candidate function template was found for dependent friend function template specialization". And it would be good to emit notes on any declarations we found but discarded.
|
Your first explanation has a subject, but the second doesn't. And I think it would be nice to suggest adding explicit scope qualification in the second case.
I assume non-templates have previously been filtered out?