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

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 6 08:16:17 PDT 2023


xbolva00 created this revision.
xbolva00 added reviewers: aaron.ballman, efriedma, haberman.
Herald added a project: All.
xbolva00 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

As noted in https://github.com/llvm/llvm-project/issues/54964 , musttail provide assurances that the tail call can be optimized on all targets.

But some users could care only one specific target and if they use musttail attribute, they may see an Clang error about signatures mismatch. This mismatch is often a not a real problem in practice and LLVM can still emit tail call.

So... Introduce [[clang::nonportable_musttail]] which is a less strict version of [[clang::musttail]] (no checking if signatures fully match).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D147714

Files:
  clang/include/clang/Basic/Attr.td
  clang/include/clang/Sema/Sema.h
  clang/lib/Sema/SemaStmt.cpp
  clang/test/SemaCXX/attr-musttail.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147714.511423.patch
Type: text/x-patch
Size: 4275 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230406/1a539089/attachment.bin>


More information about the cfe-commits mailing list