[cfe-dev] clang-tidy not running

Daniel Dilts via cfe-dev cfe-dev at lists.llvm.org
Mon Nov 9 15:34:39 PST 2015


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.

I have a file named x.cpp with the following content:
#include <vector>
std::vector<int> v;

int Func(int i, int j);


I compile it from a Windows command prompt with this:
clang-cl -c -fms-compatibility-version=19 x.cpp

No errors, warnings, etc. are emitted, and the .obj is created.

I then attempt to run clang-tidy with this:
clang-tidy x.cpp -- clang-cl -c -fms-compatibility-version=19 x.cpp

This gives me the error:
error: 'vector' file not found [clang-diagnostic-error]

I installed with the installer built today (November 9th).
clang-tidy -version
LLVM (http://llvm.org/):
  LLVM version 3.8.0-r252455
  DEBUG build with assertions.
  Built Nov  9 2015 (04:27:14).
  Default target: i686-pc-windows-gnu
  Host CPU: sandybridge

Does anyone know what I missed?  I thought that the arguments after '--'
could be used instead of a compilation database.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20151109/cf9d5204/attachment.html>


More information about the cfe-dev mailing list