<div dir="ltr"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><div>Thanks Jordy for the prompt response.</div></span><font class="Apple-style-span" face="arial, sans-serif"><br>
</font><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><div>I am facing another problem. My checker makes function calls into some utility C++ code (which is independent of clang). I want the utility code to be compiled as a separate library (say abc.a) and abc.a could be linked to the clangStaticAnalyzerCheckers.a (the checkers library).  </div>
</span><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><div> </div></span><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">I have been able to build the utility C++ code into a library </span><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">(abc.a) </span><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">through the clang Make system by following the structure of clang Makefiles. I placed the utility code at the clang/lib/StaticAnalyzer directory (along with Checkers dir) for that.</span><div>
<font class="Apple-style-span" face="arial, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="font-size: 13px; background-color: rgb(255, 255, 255); "><div>
I used the USEDLIBS option in the StaticAnalyzer/Checkers/Makefile i.e. USELIBS:=abc.a</div><div><br></div></span></font><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><div>
But, I get linker error when I refer something in the utility code from the checker, because clangStaticAnalyzerCheckers.a is not linked to my abc.a</div><div><br></div><div>Thanks again!</div><div><br></div></span><div dir="ltr">
<br><div>Tarun </div><div><br></div></div><br>
<br><br><div class="gmail_quote">On Mon, Aug 8, 2011 at 8:40 PM, Jordy Rose <span dir="ltr"><<a href="mailto:jediknil@belkadan.com">jediknil@belkadan.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
As of yet, no. We've talked about it some (most recently off-list) and agreed that it's probably useful, but there's no facility for it yet. Of course, suggestions on how this should work are always welcome; patches are even better.<br>

<br>
Meanwhile, if you're looking for a boolean toggle or a choice between a small set of values, you can fake it by having several registration functions that actually register the same checker. See NSErrorChecker for an example of this.<br>

<br>
There should probably be a report about this on Bugzilla...<br>
<font color="#888888"><br>
Jordy<br>
</font><div><div></div><div class="h5"><br>
<br>
On Aug 8, 2011, at 17:22, Tarun Sethi wrote:<br>
<br>
> Hello,<br>
><br>
> I have written a checker and I am wondering if there is anyway to pass an argument to the checker (constructor of my checker class), the scan-build command line being the source of the argument ?<br>
><br>
> Thanks in advance,<br>
><br>
> Tarun<br>
</div></div></blockquote></div><br></div></div>