[cfe-dev] scan-build in python

Laszlo Nagy rizsotto.mailinglist at gmail.com
Fri May 23 08:43:52 PDT 2014


hi all,

Jordan, thanks for your reply. i did leave out this option for a while. :)

and i got another question: about '-isysroot' flag uniqueness checking.
(ccc-analyzer: line 520) the current behavior insert the first usage of
this flag. (although it does not check the '--sysroot' uniqueness.) i'm
wondering that, shall this wrapper change or correct incorrect invocations?

i did run a test against gcc 4.9 on linux. (which shows that actually the
last '-isysroot' flag wins.) here it comes:

$ gcc -c functional_test/divide_zero.cpp
> $ gcc -c functional_test/divide_zero.cpp -isysroot /
>
$ gcc -c functional_test/divide_zero.cpp -isysroot /tmp -isysroot /

$ gcc -c functional_test/divide_zero.cpp -isysroot / -isysroot /tmp
> In file included from functional_test/divide_zero.cpp:1:0:
> /usr/include/c++/4.9.0/cassert:43:20: fatal error: assert.h: No such file
> or directory
>  #include <assert.h>
>                     ^
> compilation terminated.

$
>

another test against clang 3.4 on linux (which shows that it ignores
'-isysroot' on this platform) here it comes:

$ clang -c functional_test/divide_zero.cpp -isysroot /tmp -isysroot /
>

$ clang -c functional_test/divide_zero.cpp -isysroot / -isysroot /tmp
>
> $ clang -c functional_test/divide_zero.cpp -isysroot /tmp
> $ clang -c functional_test/divide_zero.cpp
>
> $


what do you think? or am i reading the perl code wrong about the ignorance
of the multiple '-isysroot'?

regards,
Laszlo


On Thu, May 22, 2014 at 6:45 PM, Jordan Rose <jordan_rose at apple.com> wrote:

> I'm not sure. Ted, do you remember what this was for?
>
> Laszlo, you can just leave it out for now. It's certainly not something
> most people are using if it's off by default and not exposed in scan-build.
>
> Jordan
>
>
> On May 22, 2014, at 1:01 , Laszlo Nagy <rizsotto.mailinglist at gmail.com>
> wrote:
>
> > hi Jordan,
> > hi all,
> >
> > i have a question related to ccc-analyzer. it is about the `Analyze`
> method (line 272). it does check the `$IncludeParserRejects` variable,
> which is initialized to zero once and has a comment "Set this to 1 if we
> want to include 'parser rejects' files." my question is: who will set that
> to 1? shall it be an environment which turn this on? can i leave it out
> from the rewritten version?
> >
> > thanks,
> > Laszlo
> >
> > ps.: today i could fetch the attached file. thanks for that!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140523/c97f9cbc/attachment.html>


More information about the cfe-dev mailing list