yaxunl added a comment. In D56411#1360010 <https://reviews.llvm.org/D56411#1360010>, @rjmccall wrote:
> I think the diagnostic should come during instantiation when you find an > evaluated use of a host function within a device function. It seems the body of function template is checked only during parsing of the definition of the template itself. When a function template is instantiated, the body of the instantiated function is not checked again. I could push an evaluated context, then iterate the AST of the instantiated template function to check function call expressions. However, this will increase the compilation time. Can I do the check in codegen stage where the function call instruction is emitted? That will add extra AST iteration. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56411/new/ https://reviews.llvm.org/D56411 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits