[PATCH] D85431: [analyzer] Implement a new checker ThreadPrimitivesChecker
Denys Petrov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 11 11:27:18 PDT 2020
ASDenysPetrov added a comment.
@NoQ
> You're on the right track but your checker repeats `PthreadLockChecker` word-by-word. Like, you can find answers to all your questions (eg., "how to use `isLiveRegion`?") by reading that checker. C++ functions aren't any different from C functions; that's an extremely minor difference that doesn't justify developing a new checker from scratch.
Thanks. I've already looked through PthreadLockChecker. Yes, it's pretty similar. I'll keep working separately for a while though as I feel more comfortable making mistakes.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/ThreadPrimitivesChecker.cpp:34
+
+static const std::pair<FuncIdKind, CallDescription> FuncMapping[]{
+ {Mutex_Lock, {{"std", "mutex", "lock"}, 0, 0}},
----------------
NoQ wrote:
> `CallDescriptionMap` is the modern API for this stuff.
Thanks. I'll look.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85431/new/
https://reviews.llvm.org/D85431
More information about the cfe-commits
mailing list