[cfe-dev] static analyzer warning question

Nikola Smiljanic popizdeh at gmail.com
Fri Jun 13 19:39:28 PDT 2014


Try playing with -ccc-print-phases. I'm not sure if there's a way to start
both analyzer and compiler action. Compiler action is what reports the
warning, you can enable just this action with -fsyntax-only. But passing
both --analyze and -fsyntax-only doesn't seem to work.


On Fri, Jun 13, 2014 at 9:00 PM, Laszlo Nagy <rizsotto.mailinglist at gmail.com
> wrote:

> hi All,
>
> would like to know is it possible to get the same warning while run the
> analyzer as it was produce by simple compilation?
>
> when i give this input `test.c`
>
> | typedef int __attribute__((visibility("default"))) bar;
>
> and run Clang against it, i get this warning...
>
> | $ clang -c test.c
> | test.c:1:28: warning: 'visibility' attribute ignored
> [-Wignored-attributes]
> | typedef int __attribute__((visibility("default"))) bar;
> |                           ^
> | 1 warning generated.
>
> but when i run the analyzer, i got nothing like that
>
> | $ clang -### --analyze -x c test.c
>
> then i execute the last line of this output
>
> | $ "clang" "-cc1" ....
>
> and it does not generate the warning. my question would be: is it possible
> to get that warning by passing some extra flags? or it will never appear
> during the analysis? thanks for any help.
>
> regards,
> Laszlo
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140614/585cde8a/attachment.html>


More information about the cfe-dev mailing list