erichkeane added a comment.

Yeah, I think the diagnostics result of this attribute are unacceptable.  I 
understand the goal here, but I suspect the more ergonomic (albeit, perhaps 
surprising) is a `[[should_tail]]` attribute sort of thing: a tail-hint where 
we do 'best effort with no promises', and make no guarantees that we're going 
to tail it.  I'm sure this would require more work in the backends + require an 
additional IR tag, but even that seems difficult to use properly.

Could we instead encode the platform specific tail-call rules in Sema?  We 
definitely have attributes that differ in behavior between platforms, and this 
seems like a perfect candidate.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147714/new/

https://reviews.llvm.org/D147714

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

Reply via email to