[cfe-dev] Question about scan-build

Xin Wang via cfe-dev cfe-dev at lists.llvm.org
Sat Jul 22 20:45:25 PDT 2017


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170722/580ec61c/attachment.html>


More information about the cfe-dev mailing list