lck_mtx_lock() returns void. The analyzer failed to model its effect because he was surprised that the return value is Unknown. Prepare for the aforementioned surprise and fix the tests accordingly.
Details
Diff Detail
Event Timeline
lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp | ||
---|---|---|
271 | Because it is relevant in both places. Should i rephrase with "also"/"as well"/"here too"? | |
test/Analysis/Inputs/system-header-simulator-for-pthread-lock.h | ||
29 | The tests are already there for all three functions. I just fixed their prototype to match the real-world prototype, and then adjusted the code accordingly, so that the existing tests kept passing. |
Hi Artem,
Sorry for long delay for reviews. Unfortunately, hospital is a bad place to do a code review and broken hand is a bad review assistant. This patch looks good to me, I have just a minor comment nit.
lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp | ||
---|---|---|
282 | TODO? |
Hey wb! Get well :)
lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp | ||
---|---|---|
282 | That'd make a terrible project of choice for people grepping for TODOs and FIXMEs, so I guess rather not. |
Looks good to me.
lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp | ||
---|---|---|
271 | Small rephrasing will be good because it will clearly state that it is not a copy-paste error :) |
This comment is repeated several times...