[PATCH] D140868: [C] Make (c ? e1 : e2) noreturn only if both e1 and e2 are noreturn

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 4 19:32:35 PST 2023


rjmccall added a comment.

In D140868#4027480 <https://reviews.llvm.org/D140868#4027480>, @MaskRay wrote:

> I am not a C language lawyer :) I wonder what else should be done to move this patch forward.
> The https://github.com/llvm/llvm-project/issues/59792 has got some traction and has been added a candidate for the next 15.x patch release https://github.com/llvm/llvm-project/milestone/18

We should test that this doesn't affect functions declared using the standard C attributes.  Otherwise, I think we can go forward with this change.  Aaron, does that seem reasonable to you?  For better or worse, the different spellings of `noreturn` do have different behavior already, since the standard spellings aren't supposed to be type-affecting.  And I feel like the suggested rule here is clearly correct if we have the flexibility to set it on our own.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140868



More information about the cfe-commits mailing list