<div dir="ltr">Sorry sorry in advance if this is a newbie question, I'm trying to get clang-tidy (3.8.0 trunk) working on Windows pointing at the with the Visual Studio 2015 headers (VC and UCRT)<div><br></div><div>I'm trying a very simple programme</div><div>-------------cut-------</div><div><div>#include <iostream></div><div><br></div><div>void main(int argc,char **argv)</div><div>{</div><div>   std::cerr << "Hello World" << std::endl;</div><div>}</div></div><div>-------------cut-------<br></div><div><br></div><div>clang-tidy will work perfectly until I start include system headers,stl etc...</div><div><br></div><div>I run on the command line (inside cygwin bash shell) with the following.</div><div><br></div><div><div>clang-tidy Stdio.cxx -- -I"c:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/INCLUDE" -I"c:/Program Files (x86)/Windows Kits/10/Include/10.0.10150.0/ucrt"</div></div><div><br></div><div><br></div><div>but I get a load of failures due to clang errors in the system headers.</div><div><br></div><div>Can I:</div><div><br></div><div>1) parse a switch to clang-tidy to tell it not to complain about headers outside of my control?</div><div>2) avoid this problem in the first place (I get the same if I try to compile with clang.exe or clang-cl.exe)?</div><div>3) am I making an obvious mistake?</div><div><br></div><div><div>-----------------compiler output-----------------</div><div>8 warnings and 20 errors generated.</div><div>Error while processing D:\buildareas\HEAD\issdev\src\test\tidy\Stdio.cxx.</div><div>error: too many errors emitted, stopping now [clang-diagnostic-error]</div><div>c:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/INCLUDE\vadefs.h:28:33: e</div><div>rror: expected ';' after top level declarator [clang-diagnostic-error]</div><div>        typedef unsigned __int64  uintptr_t;</div><div>                                ^</div><div>                                ;</div><div>c:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/INCLUDE\vadefs.h:127:18:</div><div>error: expected identifier or '{' [clang-diagnostic-error]</div><div>            enum : bool { __the_value = false };</div><div>                 ^</div><div>c:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/INCLUDE\vadefs.h:133:18:</div><div>error: expected identifier or '{' [clang-diagnostic-error]</div><div>            enum : bool { __the_value = true };</div><div>                 ^</div><div>c:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/INCLUDE\vadefs.h:139:18:</div><div>error: expected identifier or '{' [clang-diagnostic-error]</div><div>            enum : bool { __the_value = true };</div><div>                 ^</div><div>c:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/INCLUDE\vcruntime.h:81:1:</div><div> error: C++ requires a type specifier for all declarations [clang-diagnostic-err</div><div>or]</div><div>_CRT_BEGIN_C_HEADER</div></div><div>...... more errors cut</div><div><br></div><div>Many thanks inadvance</div><div><br></div><div>Paul</div></div>