[cfe-dev] Invalid code in PthreadLockChecker

kamlesh kumar via cfe-dev cfe-dev at lists.llvm.org
Wed Oct 30 03:52:41 PDT 2019


Hi Devs,
I was going through Clang/Static Analyser in particular
PthreadLockChecker.
There I have find this line
https://github.com/llvm-mirror/clang/blob/master/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp#L115

which I think could be modified like this
if (CE->getNumArgs() !=1)
    return;

since all of the lock/unlock/destroy function is having only single arguments.
Even a simple grep shows that only CE->getArg(0)  is used in the
particular source file.
Please clarify on this.

./Kamlesh



More information about the cfe-dev mailing list