[cfe-dev] can "clang --analyze" return non-zero result?

Laszlo Nagy via cfe-dev cfe-dev at lists.llvm.org
Sat Sep 9 19:32:15 PDT 2017


Hi Andrzej,

Clang itself might not have this flag, but scan-build has the
`--status-bugs`. Alternatively you can ask Clang to output the report in
`.plist` file, and then you can parse that file. (So you end up writing a
wrapper around Clang, but that's nearly the same thing what scan-build is
doing.)

Regards,
Laszlo

On Thu, Sep 7, 2017 at 4:41 PM, Andrzej Krzemienski via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Hi Everyone,
> When I run static analyzer from clang with `clang++ --analyze`, is there a
> way to make clang return a non-zero status code in case any warning from
> the analyzer is reported? (I am looking for something analogous to -Werror
> for normal compiler warnings.)
>
> Regards,
> &rzej;
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170910/5b4db3d0/attachment.html>


More information about the cfe-dev mailing list