Patch for compilation on msvc


This is a patch for clang and one for llvm (perhaps should post it on llvm
mailing list) allowing to build clang without error on MSVC2005.

Mainly project change but also a few missing std include header and one
compiler bug (or not, I don't know what the standard say):

for (GRExprEngine::null_iterator I=CheckerState->null_begin(),
         E=CheckerState->null_end(); I!=E; ++I) {
      const PostStmt& L = cast<PostStmt>((*I)->getLocation());
      Expr* E = cast<Expr>(L.getStmt());
      Diag.Report(FullSourceLoc(E->getExprLoc(), Ctx.getSourceManager()),

Not Expr* E who redefine E from the for initialization. Is it the same
scope? The strangest thing was that MSVC didn't complain about redefinition
but seemed to ignore the Expr* E; definition and was thinking E was a
null_iterator. Took me some time to understand the problem.

Didn't run the test, but it compile without error (not without warning...)


Ps: What should I use as LLVM_HOSTTRIPLE: "i386-win32-WinXP" ??

llvm-msvc.patch (28.2 KB)

clang-msvc.patch (7.8 KB)