title: Why does Clang++ not compile code with <header> on Windows?
body: <p>Why does clang++ compile this:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main(int argc, char **argv) {
      printf("Hello World!\n");
      return EXIT_SUCCESS;
  }
  </code></pre>
  
  <p>and do not want compile this:</p>
  
  <pre><code>#include &lt;iostream&gt;
  int main()
  {
      std::cout &lt;&lt; "FFFF\n";
      return 0;
  }
  ???
  </code></pre>
  
  <p>command line:</p>
  
  <blockquote>
    <p>clang++ -c hello.cpp -emit-llvm -o hello.bc</p>
  </blockquote>
  
  <p>too many errors emitted like this:</p>
  
  <pre><code>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\INCLUDE\xrefwrap:222:22:
  note:
        expanded from macro '_CLASS_RESULT_OF_PMF_OPT_0X'
                          __thiscall, X2, X3, X4)
  </code></pre>
  
  <p>Windows 7 64, clang-3.2, llvm-3.2, VS2012    </p>
  
  <hr>
  
  <p>=====UPDATE=====</p>
  
  <p>Command line (with -v):</p>
  
  <pre><code>clang++ -c hello.cpp -emit-llvm -o hello.bc -v
  </code></pre>
  
  <p>What I get:
  <pre>
  clang version 3.2 (tags/RELEASE_32/final)
  Target: i686-pc-win32
  Thread model: posix
   "C:/llvm/clang/build/bin/Debug/clang++.exe" -cc1 -triple i686-pc-win32 -emit-ll
  vm-bc -disable-free -main-file-name 321.cpp -mrelocation-model static -mdisable-
  fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu pentium4 -m
  omit-leaf-frame-pointer -v -coverage-file "C:\llvm\3211.bc" -resource-dir "C:/
  llvm/clang/build/bin/Debug\..\lib\clang\3.2" -fmodule-cache-path "C:\Users\
  \kpdev\AppData\Local\Temp\clang-module-cache" -internal-isystem C:/llvm/clan
  g/build/bin/Debug/../lib/clang/3.2/include -internal-isystem "C:\Program Files
  (x86)\Microsoft Visual Studio 11.0\VC\include" -internal-isystem "C:\Program
   Files (x86)\Windows Kits\8.0\\include" -std=c++11 -fdeprecated-macro -ferro
  r-limit 3 -fmessage-length 80 -mstackrealign -fms-extensions -fms-compatibility
  -fmsc-version=1300 -fdelayed-template-parsing -fobjc-runtime=gcc -fobjc-default-
  synthesize-properties -fcxx-exceptions -fexceptions -fdiagnostics-show-option -f
  color-diagnostics -o "C:\llvm\3211.bc" -x c++ "C:\llvm\321.cpp"
  clang -cc1 version 3.2 based upon LLVM 3.2svn default target i686-pc-win32
      #include "..." search starts here:
      #include &lt;...>search starts here:
   C:/llvm/clang/build/bin/Debug/../lib/clang/3.2/include
   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include
   C:\Program Files (x86)\Windows Kits\8.0\include
  End of search list.
  In file included from C:\llvm\321.cpp:1:
  In file included from C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\inc
  lude\iostream:6:
  In file included from C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\inc
  lude\istream:6:
  </pre>...etc.</p>
  
  <p>and then:</p>
  
  <p><pre>
  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\type_traits:1072:
  33: error:
        '_Ty' does not refer to a value
                  _HAS_TRIVIAL_MOVE_CONSTRUCTOR(_Ty)
                                                ^
  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\type_traits:52:38
  : note:
        expanded from macro '_HAS_TRIVIAL_MOVE_CONSTRUCTOR'
                          &amp;&amp; __has_trivial_move_constructor(_Ty)>
                                                            ^
  </pre>...etc.</p>
  
  <p>So... <code>-internal-isystem</code> point to wrong path. How to change it ?</p>