[PATCH] D37812: [analyzer] PthreadLock: Escape the pointers.

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 21 01:44:09 PDT 2017


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't it be better to branch on `IsLibraryFunction` and in one branch iterate on `Regions` and in the other, iterate on `ExplicitRegions`?
That would avoid the possible quadratic explosion when lots of explicit regions are invalidated. 


https://reviews.llvm.org/D37812





More information about the cfe-commits mailing list