Using STL for clang on Windows

For my research and experimentations (a sort of profiling and code analyses), I’m trying to use clang/llvm on the already existing programs. Some of the programs use STL and can compiled by Visual Studio 2010 (also have corresponding makefiles).

I’ve simply changed cl.exe to clang.exe. Mostly it’s working greatly! However, MSVC’s STL can’t be compiled (it’s known issue though). So, I’ve simply tried to change to STLPort. However, it still no good. Please note that I didn’t fully invest my time to use STLPort with clang.

Is there currently any workarounds for using STL in Windows platform?

Thank you for your great work, and wish to see more improvement on Windows platform.

nullnull wrote:

For my research and experimentations (a sort of profiling and code analyses), I'm trying to use clang/llvm on the already existing programs. Some of the programs use STL and can compiled by Visual Studio 2010 (also have corresponding makefiles).
I've simply changed cl.exe to clang.exe. Mostly it's working greatly! However, MSVC's STL can't be compiled (it's known issue though). So, I've simply tried to change to STLPort. However, it still no good. Please note that I didn't fully invest my time to use STLPort with clang.
Is there currently any workarounds for using STL in Windows platform?
Thank you for your great work, and wish to see more improvement on Windows platform.

stdcxx does, but there's possibly some unmerged patches for a few bugs on Win (ping me off list if you hit problems or need help)
http://stdcxx.apache.org/

Hi,
My priority #1 is to make clang parses the MSVC's STL code. I am
currently working on a delayed template parsing patch where template
function definitions are lexed and parsed at the end of the
translation unit. This patch would resolve much of the issues when
clang parses MSVC's STL. I am progressing but it is not yet ready.

After that, 2 more issues (that I know of):

1. Some missing "typename" that clang complains about but cl.exe
doesn't care bout.
2. There was also a case of a missing "template" keyword that clang
was complaining about. (as in A:: template B<T>).