[PATCH] D37806: [analyzer] PthreadLock: Fix return values of XNU lock functions.

Aleksei Sidorin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 28 09:20:29 PST 2017


a.sidorin accepted this revision.
a.sidorin added a comment.
This revision is now accepted and ready to land.

Looks good to me.



================
Comment at: lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp:271
     }
-    assert(lockFail && lockSucc);
-    C.addTransition(lockFail);
-
+    // We might want to handle the case when the mutex lock function was inlined
+    // and returned an Unknown or Undefined value.
----------------
NoQ wrote:
> zaks.anna wrote:
> > This comment is repeated several times...
> Because it is relevant in both places. Should i rephrase with "also"/"as well"/"here too"?
Small rephrasing will be good because it will clearly state that it is not a copy-paste error :)


https://reviews.llvm.org/D37806





More information about the cfe-commits mailing list