[cfe-dev] Question about scan-build
Xin Wang via cfe-dev
cfe-dev at lists.llvm.org
Mon Jul 24 05:12:36 PDT 2017
Thank you very much!
2017年7月23日星期日,Raphael Isemann <teemperor at gmail.com> 写道:
> It's probably just using the wrong clang binary that is still using
> the original checker. The documentation for the scan-build flag
> `--use-analyzer ` on this page[1] should help you. And you can try
> running in verbose mode or with strace to see what binary it uses.
>
> - Raphael
>
> [1] https://clang-analyzer.llvm.org/scan-build.html
>
>
> 2017-07-23 5:45 GMT+02:00 Xin Wang via cfe-dev <cfe-dev at lists.llvm.org
> <javascript:;>>:
> > Hello Everyone!
> >
> > I am writing a checker to check virtual call during ctor/dtor. I change
> the
> > code in the VirtualcallChecker.cpp and compile it, then I use this
> command
> > "./build/bin/clang -cc1 -analyze
> > -analyzer-checker=optin.cplusplus.VirtualCall test.cpp" to run the
> checker
> > on the testcase I write and it works as I expect.
> >
> > After that, I start to test the checker on real world code and I am using
> > the scan-build to check the build of Mozilla. The command I use is
> > ".././build/bin/scan-build -enable-checker optin.cplusplus.VirtualCall
> > ./mach build". I use the checker I wrote to check the build of Mozilla,
> the
> > message of the warnings are the message in the previous virtual call
> > checker, not the message I wrote in the current checker and it seems the
> > scan-build enable the previous virtual call checker not the checker I
> wrote.
> > Even when I remove the function of checkPreCall() which issues warning
> for
> > the checker, the scan-build also produce the same result. I don't know
> why.
> > Is it possible that after compile the checker, we should do something to
> > include the checker in the scan-build?
> >
> > Look forward to your help
> > Regards,
> > Xin
> >
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev at lists.llvm.org <javascript:;>
> > 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/20170724/9891e67e/attachment.html>
More information about the cfe-dev
mailing list