yaxunl added a comment.

In D56411#1349342 <https://reviews.llvm.org/D56411#1349342>, @rjmccall wrote:

> Sema won't necessarily have resolved a template decl when parsing a template 
> argument list, so trying to propagate that decl down to indicate that we're 
> resolving a template argument is not a good approach.
>
> I was going to suggest recording that we're within a template argument in the 
> current `ExpressionEvaluationContextRecord`, but in fact there's an even 
> simpler and more general solution: there's no reason to enforce this 
> restriction in *any* unevaluated context.  If someone wants to refer to a 
> device function within a `decltype` or `sizeof` operand, that should be fine. 
>  So you should just conditionalize the diagnostic on whether this is within 
> an unevaluated context.


For the deferred device/host check I still need to know the template decl. I 
have updated the patch to pass it through ExpressionEvaluationContextRecord.


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

Reply via email to