[PATCH] D63929: [clang-tidy] - Introduce abseil-prefixed-thread-annotations check.
Eugene Zelenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 28 07:17:41 PDT 2019
Eugene.Zelenko added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/abseil/PrefixedThreadAnnotationsCheck.cpp:15-16
+
+constexpr char kAbseilThreadAnnotationsHeader[] =
+ "absl/base/internal/thread_annotations.h";
+
----------------
lebedev.ri wrote:
> constexpr StringLiteral ?
> shouldn't this be in anonymous namespace, or be `static`?
static, please, anonymous namespaces only for class declarations.
================
Comment at: clang-tools-extra/clang-tidy/abseil/PrefixedThreadAnnotationsCheck.cpp:21
+class PrefixedThreadAnnotationsPPCallbacks : public PPCallbacks {
+ public:
+ PrefixedThreadAnnotationsPPCallbacks(ClangTidyCheck &Check,
----------------
Please run Clang-format.
================
Comment at: clang-tools-extra/docs/ReleaseNotes.rst:96
+ Checks for usages of deprecated Abseil thread annotation macros and
+ migrates them to the new macros that are prefixed with `ABSL_`.
+
----------------
Please use double back-ticks for language constructs highlighting.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/abseil-prefixed-thread-annotations.rst:6
+
+This check finds usages of deprecated Abseil thread annotation macros and
+migrates them to the new macros that are prefixed with `ABSL_`.
----------------
Please use sentence from Release Notes instead.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/abseil-prefixed-thread-annotations.rst:12
+.. code-block:: c++
+// Original - Usage of deprecated and unprefixed Abseil thread annotations.
+#include "absl/base/thread_annotations.h"
----------------
Please separate with empty line.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/abseil-prefixed-thread-annotations.rst:17
+ // ...
+ private:
+ absl::Mutex m_;
----------------
Clang-format, please.
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63929/new/
https://reviews.llvm.org/D63929
More information about the cfe-commits
mailing list