martong added a comment.

> Could you add a test for TSK_Undeclared as well?

TLDR: No, I cannot.
`TSK_Undeclared` is used to indicate that a template specialization was formed 
from a template-id but has not yet been declared, defined, or instantiated.
Consequently, 
`ClassTemplateSpecializationDecl::ClassTemplateSpecializationDecl` and 
`VarTemplateSpecializationDecl::VarTemplateSpecializationDecl` initializes its 
member `SpecializationKind` to the value `TSK_Undeclared`.
`SpecializationKind` is getting set during parsing to a meaningful kind, it is 
never left as `TSK_Undeclared`.
So, the only way I could write a test is to manually change the 
`SpecializationKind` in the "From" context, but I consider that as not a 
meaningful test, since we cannot create such `Decl` by the parser.


Repository:
  rC Clang

https://reviews.llvm.org/D47058



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to