<div dir="ltr">hi,<div><br></div><div>based on your feedbacks, made several changes to the python implementation. one of the tasks i'm struggle with is to add more comment. :) and there is one major thing which i do in the python script, because the perl script does the same. although i don't see the reason why it is like this.</div>
<div><br></div><div>when analyzer is executed it is done in two steps.</div><div><br></div><div>| $ clang -### --analyze ...the.rest.of.the.command...</div><div>| ...<br></div><div>| "clang" "-cc1" ...some.more.parameters...</div>
<div>| $ "clang" "-cc1" ...some.more.parameters...</div><div><br></div><div>so, we ask clang to print how to run the analyzer, and then we execute that command which was emitted. although it would be the very same to do this</div>
<div><br></div><div><div>| $ clang --analyze ...the.rest.of.the.command...</div>
</div><div><br></div><div>can somebody tell me what is the reason behind this indirection?</div><div><br></div><div>thanks in advance,</div><div>Laszlo</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Jun 23, 2014 at 3:30 PM, Laszlo Nagy <span dir="ltr"><<a href="mailto:rizsotto.mailinglist@gmail.com" target="_blank">rizsotto.mailinglist@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">hi there,<br><div class="gmail_extra"><br></div><div class="gmail_extra">during the last half year i did re-implemented the `ccc-analyzer` and `c++-analyzer` perl scripts in python. to make it into the Clang code base i would like to know what would be the acceptance criteria for such scripts.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">the current version available from here <<a href="https://github.com/rizsotto/Beye" target="_blank">https://github.com/rizsotto/Beye</a>><br></div><div class="gmail_extra">
<br></div><div class="gmail_extra">- it works, tested on python 2.6, 2.7, 3.x,</div><div class="gmail_extra">- it has no dependencies other than standard python modules,</div><div class="gmail_extra">- it differs from the current perl implementation in functionality,</div>
<div class="gmail_extra"> - does not generate not-used-attribute files, since analyzer does not report it;</div><div class="gmail_extra"> - does not generate parser reject report, since analyzer does not report it;</div>
<div class="gmail_extra"> - does not check '-isysroot' uniqness;</div><div class="gmail_extra"> - does execute 'clang' binary only if it needed (one time less than current perl);</div><div class="gmail_extra">
- does not copy pre-compiled header (.ghc) files into report directory;</div><div class="gmail_extra">- it works together with current 'scan-build',<br></div><div class="gmail_extra">- it was tested only on Linux.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">is it something that i need to fix or implement?</div><div class="gmail_extra"><br></div><div class="gmail_extra">what format would you like to get it? i'm thinking to create a python package out of it. (currently it's non python package conform.) but recently took a look on llvm-lit. which might be a good pattern to follow. (they keep python module structure, but CMake also plays role to install those scripts.)</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">currently unit tests are written in 'nose'. (which is non standard python module.) shall i rewrote it into the standard python unit test? is there any example inside Clang code base? (python script with tests around it.)</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">and one more question: current implementation is collecting the compiler and link options into separate array. but the link options are never used. can i stop collecting those or shall fix other parts of the code?</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">regards,</div><div class="gmail_extra">Laszlo</div><div><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 21, 2013 at 12:47 PM, Laszlo Nagy <span dir="ltr"><<a href="mailto:rizsotto.mailinglist@gmail.com" target="_blank">rizsotto.mailinglist@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">hi there,<br>
<br>
started to write a python script around Clang's static analyzer.<br>
mainly because found difficult to use the `scan-build` script. wanted<br>
to run against a compilation database instead of intercept the<br>
compiler calls. but would like to preserve the current usage as<br>
well... then at the same time, saw this page<br>
<<a href="http://clang-analyzer.llvm.org/open_projects.html" target="_blank">http://clang-analyzer.llvm.org/open_projects.html</a>> which suggest the<br>
rewrite as well. so, it might be a perfect match! ;)<br>
<br>
and as i try to copy the functionality of the `ccc-analyze` and<br>
`scan-build` scripts, discovered few minor bugs. (or they are not<br>
bugs, and i'm the one who can't read perl well.)<br>
<br>
now i'm looking for a person i can ask about these scripts.<br>
<br>
regards,<br>
Laszlo<br>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>