Fix PR19169 [Crash on invalid attempting to specialize a template method as a template variable].
A template declaration of a template name can be null in case we have a dependent name or a set of function templates. Hence use dyn_cast_or_null instead of dyn_cast. Also improve the diagnostic emitted in this case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208313 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Basic/DiagnosticSemaKinds.td 3 additions, 0 deletionsinclude/clang/Basic/DiagnosticSemaKinds.td
- lib/Sema/SemaTemplate.cpp 11 additions, 2 deletionslib/Sema/SemaTemplate.cpp
- test/SemaCXX/cxx1y-variable-templates_top_level.cpp 10 additions, 0 deletionstest/SemaCXX/cxx1y-variable-templates_top_level.cpp
Loading
Please register or sign in to comment