[cfe-dev] Trouble Using scan-build in Windows 7

Anton Yartsev anton.yartsev at gmail.com
Thu Jun 6 18:24:19 PDT 2013


Hi  Jonathan,

To use the scan-build you should get the contents of 
clang\tools\scan-build from Clang sources as Jordan pointed out.
Currently the scan-build script expects the clang executables (clang.exe 
and clang++.exe) to live in ./clang or ./bin/clang directory relative to 
directory with the scan-build stuff but you can use the 
--use-analyzer=[Xcode|path to clang] scan-build option to tell 
scan-build where your clang executables live.
The last thing you should do is to add the path to scan-build to your 
PATH and then you should be able to use scan-build as it described in 
http://clang-analyzer.llvm.org/scan-build.html.
Hope I've not missed something.
Feel free to ask and point to problems.

> No, cfe-dev is the appropriate list for questions. (Or cfe-users, but 
> to be honest we analyzer folks don't follow that list much and you 
> probably wouldn't have gotten an answer there!)
>
> scan-build is not installed with Clang or LLVM; I believe when the 
> analyzer project first began it wasn't clear if everyone would want it 
> as a part of their default install. You can find the executables in 
> tools\scan-build under your Clang source directory (probably 
> llvm\tools\clang.)
>
> I've CC'd Anton Yartsev, who I know has been running scan-build on 
> Windows for some time. (Not sure which version, though.)
> Jordan
>
>
> On Jun 3, 2013, at 14:13 , "Lockhart, Jonathan (lockhaja)" 
> <lockhaja at mail.uc.edu <mailto:lockhaja at mail.uc.edu>> wrote:
>
>> Hello Clang Users and Developers,
>>
>> I apologize in advance if this is going to the wrong email list, but 
>> I thought it would be inappropriate to send it to the dev list.
>>
>> I am currently working on using Clang and LLVM in some research I am 
>> doing. More specifically at this time I am trying to use the Clang 
>> Static Analysis Tool. I have been able to follow the instructions on 
>> the Static Analysis Tool site as well as the LLVM page for compiling 
>> the code with Cmake for use with Visual Studio, and I have 
>> successfully built the system using "ALL_BUILD" as well as have 
>> testing successfully clang by build "clang-test" in visual studio.
>>
>> With that said I seem to be able to find the bin file from which all 
>> the material from the system was installed. Following the directions, 
>> I would believe it to be located in the \bin directory under build 
>> but it is not there. I have also search my llvm and build directories 
>> with no mention of scan-build being found via inspection or search.
>>
>> I was wondering if the instructions online were outdated and a newer 
>> process for running the Clang Static Analyzer was now used? Is the 
>> project even still active and worth me using in the development of my 
>> C programs? Is there now a way to use the tool from an IDE on the 
>> code you have written, such as through Eclipse or Visual Studio?
>>
>> These are the questions I currently have as I am stuck after building 
>> and testing via the instructions found 
>> here:http://clang.llvm.org/get_started.html#build. Any assistance 
>> would be most appreciative.
>>
>> Regards,
>> Jon Lockhart
>> PhD Candidate - EE Systems
>> IEEE Vice President 13/14
>> University of Cincinnati
>> lockhaja at mail.uc.edu <mailto:lockhaja at mail.uc.edu>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu <mailto:cfe-commits at cs.uiuc.edu>
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>


-- 
Anton

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130607/914e846d/attachment.html>


More information about the cfe-dev mailing list