rsmith added a comment.

It sounds like we're failing to properly inherit default template arguments 
onto redeclarations generated by template instantiation, resulting in a 
violation of our AST invariants. This patch will hide the problem in some 
cases, but the right thing to do is to fix the root cause: we should call 
CheckTemplateParameterList to inherit the default template arguments when 
instantiating a function template declaration. (Note that 
`TemplateDeclInstantiator::VisitClassTemplateDecl` remembers to do this but 
`TemplateDeclInstantiator::VisitFunctionTemplateDecl` forgets -- as does our 
handling for variable templates, and for partial specializations of class 
templates and variable templates.)


http://reviews.llvm.org/D20192



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

Reply via email to