[PATCH] D85984: [analyzer] Add a new checker alpha.cplusplus.CPlusPlus11Lock
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 8 01:50:09 PDT 2020
NoQ added inline comments.
================
Comment at: clang/test/Analysis/Checkers/CPlusPlus11LockChecker.cpp:379-382
+void rm_bad1() {
+ rm1.lock(); // no-warning
+ rm1.lock(); // expected-warning{{This lock has already been acquired}}
+}
----------------
I repeat, this is a false positive. Recursive mutexes can be locked twice, that's the whole point.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85984/new/
https://reviews.llvm.org/D85984
More information about the cfe-commits
mailing list