[cfe-dev] Making analyzer warnings fatal

Artem Dergachev via cfe-dev cfe-dev at lists.llvm.org
Mon Jun 3 13:41:49 PDT 2019


We have the scan-build --status-bugs flag for this purpose. I don't 
think we have such flag for invoking Clang directly, but that's not a 
reasonable user interface anyway.

On 6/3/19 11:20 AM, Keno Fischer via cfe-dev wrote:
> Hi everyone,
>
> for the Julia source code, we have custom clang analyzer plugin that
> validates certain GC invariants (GC frame management, making sure
> values are rooted across safepoints, etc) in our runtime library [1].
> We've now started running this on CI, but we noticed that newly
> introduced errors don't actually cause the clang process to return a
> non-zero exit code and are thus indistinguishable from a clean
> analysis result. Is there a way to turn analyzer warnings into errors?
> We tried `-Werror`, but that gets explicitly filtered when the
> analyzer is used. There's probably something obvious we're missing,
> but I didn't see anything even scanning through the source code.
>
> Thanks,
> Keno
>
>
> [1] https://github.com/JuliaLang/julia/blob/master/src/clangsa/GCChecker.cpp
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list