<div dir="ltr"><br><div class="gmail_extra"><br></div><div class="gmail_quote">On Mon, Nov 9, 2015 at 3:34 PM, Daniel Dilts <span dir="ltr"><<a href="mailto:diltsman@gmail.com" target="_blank">diltsman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div><div>I am trying to get a custom tool to work, but it seems that learning why I can't get clang-tidy to work would be a good first step.<br></div></div><div><br></div><div>I have a file named x.cpp with the following content:</div><div>#include <vector><br>std::vector<int> v;</div><div><br></div><div>int Func(int i, int j);</div><div><br></div><div><br></div><div>I compile it from a Windows command prompt with this:</div><div>clang-cl -c -fms-compatibility-version=19 x.cpp</div><div><br></div><div>No errors, warnings, etc. are emitted, and the .obj is created.</div><div><br></div><div>I then attempt to run clang-tidy with this:</div><div>clang-tidy x.cpp -- clang-cl -c -fms-compatibility-version=19 x.cpp</div><div><br></div><div>This gives me the error:</div><div>error: 'vector' file not found [clang-diagnostic-error]</div><div><br></div><div>I installed with the installer built today (November 9th).</div><div>clang-tidy -version</div><div>LLVM (<a href="http://llvm.org/" target="_blank">http://llvm.org/</a>):<br>  LLVM version 3.8.0-r252455<br>  DEBUG build with assertions.<br>  Built Nov  9 2015 (04:27:14).<br>  Default target: i686-pc-windows-gnu<br>  Host CPU: sandybridge</div><div><br></div><div>Does anyone know what I missed?  I thought that the arguments after '--' could be used instead of a compilation database.</div></div>
</blockquote></div><div><br></div><div>While I have found that passing the triple to clang-tidy works (clang-tidy x.cpp -- -target x86_64-pc-windows-msvc19.0.0 -c x.cpp), I am still curious as to why it didn't work passing the compiler command-line.</div><div class="gmail_extra"><br></div></div>