[PATCH] D62801: Add "will-return" function attribute

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 09:21:44 PDT 2019


jdoerfert added inline comments.


================
Comment at: llvm/docs/LangRef.rst:1479
+    This produces undefined behavior at runtime if the function never comes back
+    to the call site.
 ``nounwind``
----------------
jdoerfert wrote:
> You should allow exceptions here, I think. That would make `will-return` and orthogonal to `nounwind` (aka. no-throw).
> 
> We can also think about removing the hypen, idk what is best.
> 
> 
One idea to phrase it would be:

"the function will, after a finite amount of time, stop executing without ending execution of the program."

Or:

"either exhibit undefined behavior or comes back and continues execution at a point in the existing call stack that includes the current invocation."


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62801





More information about the llvm-commits mailing list