The new clang-tidy check "abseil-prefixed-thread-annotations" checks for usages of deprecated Abseil thread annotation macros and migrates them to the new macros that are prefixed with ABSL_.
Details
Diff Detail
Event Timeline
Do you have commit access?
| clang-tools-extra/clang-tidy/abseil/PrefixedThreadAnnotationsCheck.cpp | ||
|---|---|---|
| 43 | "unprefixed" is not something that the user cares about. Try wording it the message around deprecation. Describing the fix-it in the message is also a good idea. "annotations without the 'ABSL_' prefix are deprecated; use the new name instead" | |
| clang-tools-extra/clang-tidy/abseil/PrefixedThreadAnnotationsCheck.cpp | ||
|---|---|---|
| 43 | Same suggestion for the check name. WDYT about "DeprecatedThreadAnnotationsCheck"? | |
I have the same observation as with googletest patch (D62977),
and i'd guess this applies to all these clang-tidy abseil checks (meaning the existing ones are all equally broken):
there is no checking that the new macro actually exists.
| clang-tools-extra/clang-tidy/abseil/PrefixedThreadAnnotationsCheck.cpp | ||
|---|---|---|
| 41 | This isn't being tested. What happens if the macro comes from non-abseil header? | |
| clang-tools-extra/clang-tidy/abseil/PrefixedThreadAnnotationsCheck.cpp | ||
|---|---|---|
| 15–16 | static, please, anonymous namespaces only for class declarations. | |
| 21 | Please run Clang-format. | |
| clang-tools-extra/docs/ReleaseNotes.rst | ||
| 96 | Please use double back-ticks for language constructs highlighting. | |
| clang-tools-extra/docs/clang-tidy/checks/abseil-prefixed-thread-annotations.rst | ||
| 6 | Please use sentence from Release Notes instead. | |
| 12 | Please separate with empty line. | |
| 17 | Clang-format, please. | |
constexpr StringLiteral ?
shouldn't this be in anonymous namespace, or be static?