[PATCH] D91000: [clang-tidy] Add cert-msc24-c checker.

Fütő Gergely via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 3 03:44:42 PST 2021


futogergely marked an inline comment as done.
futogergely added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/cert/ObsolescentFunctionsCheck.cpp:48
+  // Matching functions with safe replacements in annex K.
+  auto FunctionNamesWithAnnexKReplacementMatcher = hasAnyName(
+      "::asctime", "::ctime", "::fopen", "::freopen", "::bsearch", "::fprintf",
----------------
whisperity wrote:
> Is this ordering specific in any way? Is the rule listing them in this order? If not, can we have them listed alphabetically, for easier search and potential later change?
done


================
Comment at: clang-tools-extra/docs/clang-tidy/checks/cert-msc24-c.rst:10
+For the listed functions, an alternative, more secure replacement is suggested, if available.
+The checker heavily relies on the functions from annex K (Bounds-checking interfaces) of C11.
+
----------------
whisperity wrote:
> (And consistent capitalisation later.)
done


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

https://reviews.llvm.org/D91000



More information about the cfe-commits mailing list