rjmccall added a comment.

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.


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