This revision was not accepted when it landed; it landed in state "Needs
Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGdd22be1e3d98: [analyzer] PthreadLock: Implement mutex
escaping. (authored by dergachev.a).
Herald added subscribers: Charu
a.sidorin added a comment.
Hi Artem. The patch looks mostly good, but I have an inline question.
Comment at: lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp:588
+if (Call->isInSystemHeader())
+ IsLibraryFunction = true;
+ }
Do we think that only sy
xazax.hun added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp:594
+// it takes the mutex explicitly as an argument.
+if (IsLibraryFunction &&
+std::find(ExplicitRegions.begin(), ExplicitRegions.end(), R) ==
Wouldn
NoQ created this revision.
As usual, we need to invalidate mutex states when something may touch them.
Implement this boilerplate for the thread lock checker.
The previous refactoring is handy for listing functions on which we don't need
to invalidate mutex states because we model them instead.