Seems we are missing C++20 compatibility warning of using deduced type
(e.g. some template class) as a non-type template parameter. Before this
patch the following code crashes clang.
template<class> struct DC {}; template<DC s> // using deduced type, but considered as "auto" type auto test() {}
It triggered warn_cxx14_compat_template_nontype_parm_auto_type. However
there is no such "auto" type at all.
Using deduced type within non-type template parameter was introduced in
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0732r2.pdf.
This patch create a new compatibility diagnostic message for this.
This largely duplicates the effort from D132990
Your patch will also fix the crash fixed by D132990, and I even suggested there also handling deduced template specializations.
Two points about this change though: