title: How to extract compilation args for each compilation unit in a vcxproj?
body: <p>I'm trying to get the compilation args for each compilation unit so I can create the "<a href="http://clang.llvm.org/docs/JSONCompilationDatabase.html" rel="nofollow">compilation_commands.json</a>" for my vcxproj that can be used with clang's libTooling. </p>
  
  <p>The <a href="http://clang.llvm.org/docs/LibTooling.html" rel="nofollow">libTooling tutorial</a> suggests using a <code>CompilationDatabase</code> to provide the compilation args for all the cpp files in a project. The tutorial shows that CMake can generate the compilation_commands.json for CMake based projects. </p>
  
  <p>Since clang can be put into "MSVC mode" via <code>clang.exe --driver-mode=cl</code> or <code>clang-cl.exe</code> my thought was if I could get the compilation args for each cpp file in my VS2012 project I can create the compilation_commands.json for a vcxproj.</p>
  
  <p>However I'm having trouble finding APIs in the VS2012 SDK that walks a vcxproj and retrieves the compilation args for each compilation unit. Can someone point me towards the right APIs?</p>