ASDenysPetrov added a comment.

@steakhal

> the readability of the reports should be improved.

Absolutely agree. Let's do this in the next patches :)

@NoQ 
You've recommended to extend PthreadLockChecker with STL mutexes. I think I've 
done. Could you make a quick look, please?



================
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}}
+}
----------------
NoQ wrote:
> I repeat, this is a false positive. Recursive mutexes can be locked twice, 
> that's the whole point.
Yes, I remember. I think you've mixed up with my previous attempts of 
introducting a new checks for recursive mutexes.
This is not this case. This kind of checks already exists in PthreadLockChecker 
before.
I've just reused this check for all kind of STL mutexes.

If you look at `void bad1()` in clang\test\Analysis\pthreadlock.c you can find 
the same case.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85984/new/

https://reviews.llvm.org/D85984

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to