[PATCH] D96719: [clang-tidy] Add new check 'bugprone-thread-canceltype-asynchronous' and alias 'cert-pos47-c'.
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 18 06:08:26 PST 2021
aaron.ballman added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp:114
"cert-pos44-c");
+ CheckFactories.registerCheck<concurrency::ThreadCanceltypeAsynchronousCheck>(
+ "cert-pos47-c");
----------------
80-col issue?
================
Comment at: clang-tools-extra/clang-tidy/concurrency/ThreadCanceltypeAsynchronousCheck.cpp:34
+ if (!PthreadCancelAsynchronousValue) {
+ const auto IsAsynchronous = [](const auto &KeyValue) -> bool {
+ return KeyValue.first->getName() == "PTHREAD_CANCEL_ASYNCHRONOUS" &&
----------------
Drop the top-level `const` unless it's a pointer/reference to a `const` object (here and elsewhere in the patch).
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/list.rst:98
`bugprone-terminating-continue <bugprone-terminating-continue.html>`_, "Yes"
+ `bugprone-thread-canceltype-asynchronous <bugprone-thread-canceltype-asynchronous.html>`_, "No"
`bugprone-throw-keyword-missing <bugprone-throw-keyword-missing.html>`_,
----------------
It looks like this file needs to be updated from the rename.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96719/new/
https://reviews.llvm.org/D96719
More information about the cfe-commits
mailing list