[clang] [clang][analyzer][NFC] Add test for a limitation of alpha.unix.Bloc… (PR #93799)

Endre Fülöp via cfe-commits cfe-commits at lists.llvm.org
Fri May 31 01:32:45 PDT 2024


gamesh411 wrote:

> It's good to document this, the commit LGTM. Are you planning to fix this soon?

I have been looking into the [alpha.unix.PthreadLock](https://clang.llvm.org/docs/analyzer/checkers.html#alpha-unix-pthreadlock-c) checker. By reusing the logic there https://github.com/llvm/llvm-project/blob/b86a9c5bf2fab0408a3d549995d6e2449f71a16d/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp#L454-L472 that detects whether a lock has indeed been locked or not, we also get rid of this limitation "for free" (Aside from the fact that we have to unify the implementations because there is enough effective code duplication across these checkers as currently stands, but this is the way forward IMO, and I'm currently working on this).

https://github.com/llvm/llvm-project/pull/93799


More information about the cfe-commits mailing list