[cfe-dev] Clang static analyzer: ignore library headers?

Aemon Cannon aemoncannon at gmail.com
Tue Sep 17 10:51:23 PDT 2013


> Determining them based on -I vs -isystem would seem to be a sensible
> distinction.
>
> At least, that's what I use to include third party libraries when I want
> to ignore warnings they produce.  It's entirely possible I'm abusing
> that feature.
>
>
> It's a bit of an abuse but likely not a harmful one.
>

So, something like: -analyzer-opt-ignore-system-headers ?
This would fix my situation, provided I'm willing to go through my build
command and replace several instances of -I with -isystem for the purposes
of analysis. I don't think that would break the semantics of my build, but
I'm not sure you can say that in general. Changing from -I to -isystem will
cause the directory to be searched after all -I directories, so if your
build is order sensitive, that might cause problems.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130917/50ab545e/attachment.html>


More information about the cfe-dev mailing list