<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Some of these functions do actually take two arguments, eg.:<br>
<br>
<span class="pl-s">int pthread_mutex_init(pthread_mutex_t *mutex,
const pthread_mutexattr_t *attr)</span>.<br>
<br>
We might not query these arguments because they aren't of interest
to the checker, but they still exist in the code.<br>
<br>
That said, if you're interested in improving this part of the
checker, you may try to convert it to CallDescriptionMap which is
more specific and less fragile.<br>
<br>
<div class="moz-cite-prefix">On 10/30/19 3:52 AM, kamlesh kumar via
cfe-dev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CABKRkgiu83LxWxJ+TVNwZ3yOvoqg-nQ=74nunp=cuD68ktrYCA@mail.gmail.com">
<pre class="moz-quote-pre" wrap="">Hi Devs,
I was going through Clang/Static Analyser in particular
PthreadLockChecker.
There I have find this line
<a class="moz-txt-link-freetext" href="https://github.com/llvm-mirror/clang/blob/master/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp#L115">https://github.com/llvm-mirror/clang/blob/master/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp#L115</a>
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
_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>