[PATCH] D147714: [Attr] Introduce [[clang::nonportable_musttail]] as less strict version of [[clang::musttail]]

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 7 06:02:54 PDT 2023


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



More information about the cfe-commits mailing list