[PATCH] D90944: [clang-tidy] implement concurrency-mt-unsafe
Vasily Kulikov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 26 09:12:32 PST 2020
segoon added a comment.
In D90944#2418845 <https://reviews.llvm.org/D90944#2418845>, @lebedev.ri wrote:
> In D90944#2418792 <https://reviews.llvm.org/D90944#2418792>, @segoon wrote:
>
>> - mark mt-unsafe decls and check for marks in exprs
>
> Eeeh.
> I was thinking of either some smart matcher "match any function declaration
> with name from these lists, and then match every call to said decl".
I tried to utilize bind()+equalsBoundNode(), but it seems it's impossible to mark and use the mark in a single matcher.
> But the current implementation, i'm not sure this approach is even legal for checks.
The trick is stolen from abseil/UpgradeDurationConversionsCheck.h. If it's invalid here, then abseil should be fixed too.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90944/new/
https://reviews.llvm.org/D90944
More information about the cfe-commits
mailing list