Clang and MSVC headers


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?



I suppose you mean "Unqualified lookup into dependent bases of class templates"?
As in

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.

– Erik.

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.