[PATCH] D112409: [clang-tidy] Add check 'cert-err33-c'.

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 25 09:35:39 PDT 2021


aaron.ballman added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp:45-50
+// The following functions are
+// deliberately excluded because they can
+// be called with NULL argument and in
+// this case the check is not applicable:
+// mblen, mbrlen, mbrtowc, mbtowc, wctomb,
+// wctomb_s
----------------
Pretty sure this comment can be re-flowed to 80 columns. Also needs trailing punctuation.


================
Comment at: clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp:52
+// FIXME: The check can be improved to handle such cases.
+const llvm::StringRef CertErr33CCheckedFunctions = "::aligned_alloc;"
+                                                   "::asctime_s;"
----------------
Was this list generated automatically or manually? (Just wondering how hard to match it to the CERT rule -- spot checking hasn't found issues so far.)


================
Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-unused-return-value.rst:51
+listed in CERT_rule ERR33-C.
\ No newline at end of file

----------------
Can you add a newline back?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112409



More information about the cfe-commits mailing list