Subject: Re: [boost] Scalpel: a Spirit&Wave-powered C++ source code analysis library
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2010-09-07 01:07:38
On Sep 6, 2010, at 7:01 PM, Nelson, Erik - 2 wrote:
> Sebastian Redl wrote on Monday, September 06, 2010 8:51 PM
>>> On Sep 6, 2010, at 5:32 PM, Nelson, Erik - 2 wrote:
>>> Last time I looked at Clang, it wasn't compilable with MSVC- is my
>>> memory accurate?
>> It's probably accurate, but also outdated. Clang can
>> be compiled by Visual Studio (many thanks to Steven Watanabe,
>> by the way). What Clang can't do yet is parse VS's own headers,
>> at least not enough of them for reasonable programs.
>> So you have to use MinGW's headers.
> It's great that folks are working hard on it, but it's simply a
> nonstarter (for me, and I expect many others) to have to install yet
> another environment (MinGW) in order to use it.
You misunderstand. Clang works perfectly fine when compiled with Visual Studio. As far as Clang's own code is concerned, it has its own portability layer, and it doesn't need any POSIX portability layer. (MinGW isn't one anyway.)
But it can't parse the header files supplied with Visual Studio, because they're not C++, they're VS's dialect of C++. That's a problem that affects *every* C++ parser. You have to implement Microsoft's extensions before you can use their headers. This is why, if you want to actually parse C++ code in Windows, you need to avoid VS headers, and MinGW happens to offer replacements.