[cfe-dev] static analyzer warning question

Laszlo Nagy rizsotto.mailinglist at gmail.com
Fri Jun 13 04:00:52 PDT 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140613/e03e27ca/attachment.html>


More information about the cfe-dev mailing list