[all-commits] [llvm/llvm-project] f27c8a: [clang-tidy] Add the `bugprone-unsafe-functions` c...

futog via All-commits all-commits at lists.llvm.org
Thu Feb 2 05:12:23 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f27c8ac83e7cb945c8b3f9bf0092f8cf93278b5c
      https://github.com/llvm/llvm-project/commit/f27c8ac83e7cb945c8b3f9bf0092f8cf93278b5c
  Author: Gergely Fűtő <futogergely at gmail.com>
  Date:   2023-02-02 (Thu, 02 Feb 2023)

  Changed paths:
    M clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
    M clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
    A clang-tools-extra/clang-tidy/bugprone/UnsafeFunctionsCheck.cpp
    A clang-tools-extra/clang-tidy/bugprone/UnsafeFunctionsCheck.h
    M clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst
    A clang-tools-extra/docs/clang-tidy/checks/bugprone/unsafe-functions.rst
    A clang-tools-extra/docs/clang-tidy/checks/cert/msc24-c.rst
    A clang-tools-extra/docs/clang-tidy/checks/cert/msc33-c.rst
    M clang-tools-extra/docs/clang-tidy/checks/list.rst
    A clang-tools-extra/test/clang-tidy/checkers/bugprone/unsafe-functions.c

  Log Message:
  -----------
  [clang-tidy] Add the `bugprone-unsafe-functions` check

Checks for unsafe functions, mostly those listed in the
SEI CERT C Coding Standard Recommendation `MSC24-C` and Rule `MSC33-C`.

For the listed functions, an alternative, more secure replacement is
suggested, if such is available. The checker heavily relies on the
functions from "Annex K" (Bounds-checking interfaces) from C11, but
there are several other recommendations not directly from Annex K.

Differential Revision: http://reviews.llvm.org/D91000

Reviewed-By: aaron.ballman, dkrupp, steakhal, whisperity

Co-Authored-By: Tamás Koller <koller.tamas1996 at gmail.com>
Co-Authored-By: Balázs Benics <balazs.benics at sigmatechnology.se>
Co-Authored-By: Whisperity <whisperity at gmail.com>




More information about the All-commits mailing list