[PATCH] D85431: [analyzer] Implement a new checker ThreadPrimitivesChecker
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 11 11:04:58 PDT 2020
NoQ added a comment.
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.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/ThreadPrimitivesChecker.cpp:34
+
+static const std::pair<FuncIdKind, CallDescription> FuncMapping[]{
+ {Mutex_Lock, {{"std", "mutex", "lock"}, 0, 0}},
----------------
`CallDescriptionMap` is the modern API for this stuff.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85431/new/
https://reviews.llvm.org/D85431
More information about the cfe-commits
mailing list