[cfe-dev] VS2010 Clangification Script

Clark Gaebel cg.wowus.cg at gmail.com
Tue Mar 16 13:25:35 PDT 2010


Attached is my attempt at documentation (should be easily modified to 
fit the style of clang.llvm.org) and an updated script for easier 
modification.

On 16/03/2010 12:56 AM, Ted Kremenek wrote:
> Hi Clark,
>
> This is a really nice step.  I'm not super fluent in Python, but I did find the code fairly intuitive.  Some of the spacing between conditionals doesn't seem as tight as I am use to seeing, e.g. the extra lines at line 110, but overall it simple and readable.
>
> The approach is a good first step, and should be useful for small VS projects.  This approach will run into issues if any of the following happen:
>
> (1) Intermediate files are needed to be generated by the build in order to compile other files
>
> (2) Any of the source files take different compiler flags
>
> Both (1) and (2) are the reason scan-build actually interposes itself in a regular build.  That is the the ultimate truth of what the compiler really sees, and that's what's needed for accurately processing source files.
>
> I have little experience with VS these days, and don't know what hooks it has to make it more extensible.  I certainly would like to see more support for the analyzer on Windows, and would be happy to post this script on the clang-analyzer website if you were so kind to provide a brief writeup of how to use it.
>
> Ted
>
> On Mar 8, 2010, at 5:56 PM, Clark Gaebel wrote:
>
>> Because scan-build only works with gcc-like compilers, MSVC seems awfully lacking. As such, I wrote a little (~100 LOC) script to scan VS2010 project files and run the appropriate clang based on the input.
>>
>> I've attached the script. How can I make it available to the rest of the world?
>>
>> Also - code review. How does that work here? Python's cool, but I'm by no means the best at it.
>>
>> Thanks,
>> -Clark
>> <clangify.py>_______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: clangify2010.py
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100316/bf1eb898/attachment.ksh>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100316/bf1eb898/attachment.html>


More information about the cfe-dev mailing list