[PATCH] D90851: [clang-tidy] Extending bugprone-signal-handler with POSIX functions.

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 8 07:45:40 PST 2021


aaron.ballman added inline comments.


================
Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-signal-handler.rst:29-30
+  <https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04_03>`_
+  for more information). This is not an extension of the minimal set (``quick_exit``
+  is not included). Default is ``POSIX``.
----------------
balazske wrote:
> aaron.ballman wrote:
> > aaron.ballman wrote:
> > > Huh, that's really strange that POSIX leaves `quick_exit` off the list. I'm going to reach out to someone from the Austin Group to see if that's intentional or not.
> > I didn't need to reach out to them because I realized the latest POSIX spec is still based on C99 and they've not released the updated POSIX spec yet.
> > 
> > I think the POSIX functions should be a superset of the C functions.
> Do you mean that we should add `quick_exit` to the POSIX set? And have a requirement that minimal set is subset of the POSIX set (if the lists are modified in the future)?
> Do you mean that we should add quick_exit to the POSIX set? And have a requirement that minimal set is subset of the POSIX set (if the lists are modified in the future)?

Sorry for having missed your question earlier!

I think any function in the minimally safe set should also be safe within the POSIX set unless there's some documentation to suggest that POSIX removed an allowance the C standard provides for a given API (which would be pretty surprising). So yes, I think the minimal set should be a subset of the POSIX set.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90851



More information about the cfe-commits mailing list