[PATCH] D85431: [analyzer] Implement a new checker ThreadPrimitivesChecker
Denys Petrov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 6 06:28:51 PDT 2020
ASDenysPetrov created this revision.
ASDenysPetrov added reviewers: NoQ, vsavchenko, xazax.hun, steakhal, baloghadamsoftware, dcoughlin, Szelethus.
ASDenysPetrov added a project: clang.
Herald added subscribers: cfe-commits, martong, Charusso, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, mgorny.
ASDenysPetrov requested review of this revision.
This checker finds STL thread primitives misuse.
- std::mutex::unlock without std::mutex::lock
- std::mutex::lock twice
In future:
- std::mutex::lock without std::mutex::unlock (discuss)
- std::recursive_mutex support
P.S. This is an alpha version of my first checker. Do not hesitate to express your complaints!
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D85431
Files:
clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt
clang/lib/StaticAnalyzer/Checkers/ThreadPrimitivesChecker.cpp
clang/test/Analysis/Checkers/ThreadPrimitivesChecker.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85431.283592.patch
Type: text/x-patch
Size: 7710 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200806/311541aa/attachment-0001.bin>
More information about the cfe-commits
mailing list