[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

Endre Fülöp via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 13 14:11:41 PDT 2020


gamesh411 created this revision.
Herald added subscribers: llvm-commits, cfe-commits, martong, steakhal, Szelethus, dkrupp, xazax.hun, whisperity, mgorny.
Herald added projects: clang, LLVM.

Add check for the SEI CERT item ENV32-C which dictates that exit handler
functions should terminate by returning as opposed to calling exit-functions
or jumping out of the handler function body with 'longjmp'. The handler
registration functions 'atexit and 'at_quick_exit',  exit functions '_Exit',
'exit', 'quick_exit are checked.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83717

Files:
  clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
  clang-tools-extra/clang-tidy/cert/CMakeLists.txt
  clang-tools-extra/clang-tidy/cert/ExitHandlerCheck.cpp
  clang-tools-extra/clang-tidy/cert/ExitHandlerCheck.h
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/cert-env32-c.rst
  clang-tools-extra/docs/clang-tidy/checks/list.rst
  clang-tools-extra/test/clang-tidy/checkers/cert-env32-c.c
  llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/cert/BUILD.gn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83717.277564.patch
Type: text/x-patch
Size: 24763 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200713/3df42435/attachment-0001.bin>


More information about the cfe-commits mailing list