[cfe-dev] Clang static analyzer: Scan-build: No bugs found with msbuild
George Karpenkov via cfe-dev
cfe-dev at lists.llvm.org
Fri Nov 16 16:18:14 PST 2018
Hi Irin,
scan-build works by replacing the CC variable with the name of the analyzer,
that might not work on visual studio.
Quick googling suggests that you might be able to extract the compilation database using visual studio plugins,
and then you can run the analyzer on that, using the analyze-build python script (IIRC, it is pip-installable).
George
> On Nov 15, 2018, at 6:17 AM, SAMUEL Irin Ann via cfe-dev <cfe-dev at lists.llvm.org> wrote:
>
> Hello developers,
>
> I am trying to analyze my c++ visual studio project with clang static analyzer. I have built the clang project from svn repository and added the clang binaries folder to the Path.
>
> But, when I run the following command, MSBuild only builds the project and there is no analysis from clang.
>
> Project folder>scan-build.bat --use-analyzer=D:\llvm-build\Debug\bin\clang.exe "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe" Common.vcxproj
> The output I get is
>
> Build succeeded. 0 Warning(s) 0 Error(s)
>
> Time Elapsed 00:00:04.72 scan-build: Removing directory '\Local\Temp/scan-build-2018-11-15-145207-11916-1' because it contains no reports. scan-build: No bugs found.
>
> Could anyone tell me what is wrong here?
>
> Thanks in advance!
>
> Best regards,
> Irin
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev <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/20181116/9ce538a3/attachment.html>
More information about the cfe-dev
mailing list