[cfe-users] How to get more useful chain of reasoning from scan-build?
Rainer Gerhards
rgerhards at hq.adiscon.com
Mon Jul 6 00:24:17 PDT 2015
You can get that with scan-view. Look at the last few lines of your
build, it should tell you the exact command to use (at least mine
does). I hope I am not overlooking something as I am myself fairly new
to clang ... but really like it.
HTH
Rainer
2015-07-04 17:52 GMT+02:00 Richard <legalize at xmission.com>:
> Many times when I run scan-build on my code, it reports out something like:
>
> assimp/code/BoostWorkaround/boost/shared_ptr.hpp:135:13: warning: Called C++ object pointer is null
> ctr = ptr?r.ctr->incref():NULL;
> ~~~~~~~~~~~~~~~
> (see <https://travis-ci.org/LegalizeAdulthood/assimp/jobs/69545097>)
>
> But when I look at my code, I don't understand why this could be the case.
> If scan-build would tell me the line of reasoning that led to this conclusion,
> then I would understand the problem better. I've tried adding additional -v
> arguments to my scan-build invocation, but that just seems to give me a ton
> of debug spew and doesn't help me understand the problem any better.
>
> If you're familiar with the output of Coverity, it gives a very specific line
> of reasoning for each problem reported, allowing you to understand exactly
> how the problem might occur.
>
> How can I get something similar from scan-build?
> --
> "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
> The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
> The Terminals Wiki <http://terminals.classiccmp.org>
> Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>
>
> PS: Mail filters are blocking my messages, so ignore this, its
> only for them. Lorem ipsum dolor sit amet, consectetur adipiscing
> elit. Phasellus consequat ullamcorper mollis. Sed blandit semper tortor
> ultricies dictum. Proin hendrerit et quam in sagittis. Maecenas vel
> blandit ante, in auctor sem. Phasellus condimentum leo vel finibus
> viverra. Duis fermentum sollicitudin est, ac iaculis lectus auctor vel.
> Nam condimentum nulla feugiat, venenatis nibh a, elementum nulla. Nulla
> vitae malesuada eros. Nulla cursus maximus ligula non hendrerit.
>
> Curabitur lobortis nulla vel sapien posuere, id aliquam orci
> bibendum. Vestibulum at vulputate risus. Proin in purus commodo,
> tempus lectus vitae, faucibus nunc. Aenean congue faucibus elit, sit
> amet facilisis nibh ultrices eget. Nam pulvinar leo ac nunc ultricies,
> nec tincidunt nulla tincidunt. Etiam placerat felis tellus, ut ultricies
> nunc ultricies quis. In placerat sapien nec ultricies mattis. Integer
> sed tempor orci, ac imperdiet orci. Integer ac augue et augue convallis
> faucibus.
> _______________________________________________
> cfe-users mailing list
> cfe-users at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users
More information about the cfe-users
mailing list