[clang] Improve diagnostics for CTAD #92393
Labels
clang:diagnostics
New/improved warning or error message in Clang, but not in clang-tidy or static analyzer
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
confirmed
Verified by a second party
Consider the following example:
This code is invalid as class template argument deduction fails, and the diagnostics emitted by clang are:
We have two template candidates (
auto(T, U) -> Foo<T>
,auto (Foo<T>) -> Foo<T>
), and both of them are not viable during the function overload resolution.As noticed, the above diagnostic messages only mention "candidate template ignored", making it hard to identify which template candidate. The diagnostic position doesn't give much useful information as these templates are synthesized.
I think we can improve this by printing the function signature in the diagnostic message.
The text was updated successfully, but these errors were encountered: