[cfe-dev] Clang and MSVC headers

Francois Pichet pichet2000 at gmail.com
Wed Jul 20 07:48:16 PDT 2011

On Wed, Jul 20, 2011 at 10:39 AM, Erik Verbruggen
<erik.verbruggen at me.com> wrote:
> On 20 Jul, 2011,at 04:07 PM, Francois Pichet <pichet2000 at gmail.com> wrote:
> On Wed, Jul 20, 2011 at 9:47 AM, Erik Verbruggen <erik.verbruggen at me.com>
> wrote:
>> Hello,
>> I was wondering what the status is for Clang w.r.t. parsing MSVC headers.
>> I
>> tried to use Clang's code completion today with MSVC, but the issue of
>> name
>> resolution in type-independant functions in templates popped up. So, is
>> somebody working on this, or how far along is it?
>> Regards,
>> Erik.
> hi,
> I suppose you mean "Unqualified lookup into dependent bases of class
> templates"?
> As in http://clang.llvm.org/compatibility.html#dep_lookup_bases.
> That issue is at the top of my todo list. I did some investigation but
> haven't started the coding really.
> Feel free to hijack that feature from me if you feel motivated.
> No, I mean the (probably well-known) error:
> C:\Program Files\Microsoft Visual Studio 9.0\VC\include/iosfwd(219) : error:
> no member named '_invalid_parameter_noinfo' in the global namespace; did you
> mean '_invalid_parameter_handler'?
>                 _SCL_SECURE_CRT_VALIDATE(_Dest_size >= _Count, NULL);
>                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> So where MSVC postpones name resolution for methods in templates classes
> until instantiation time.

try -fdelayed-template-parsing to get around this problem.
I think -fdelayed-template-parsing should be there by default if clang
is built with MSVC. I'll see what I can do.

Beside that, since you are using the MSVC 2008 headers, you might get
2-3 errors because of missing typename. (Depending on which files you
include), Don't try MFC or ATL headers, we are not there yet.

More information about the cfe-dev mailing list