[cfe-dev] Error while trying to load a compilation database:
Jonathan Roelofs via cfe-dev
cfe-dev at lists.llvm.org
Wed Feb 3 06:56:37 PST 2016
On 2/3/16 7:45 AM, phi clang via cfe-dev wrote:
>
> Thanx for yout reply.
>
> I am in b) I don't have a DB.
>
> I red some docco on llvm , I did
>
> CX08$ clang-tidy -dump-config >.clang-tidy
>
> But it didn't solved anything what I guess is normal .clang.tidy seems
> to be a configuration file.
>
> I don't know what is a DB, sonds like I need to run Cmake but I don't
> know that at the moment (only know make). I 'try' clang-tidy and
> clang-format, first locally on a couple of files, then later on a bunch
> of files.
http://clang.llvm.org/docs/JSONCompilationDatabase.html
As an alternative to using a compilation database, you could also use
the `--` flag. Suppose your normal clang command-line was:
$ clang -fblocks foo.c
Then your clang-tidy command-line would be something like:
$ clang-tidy foo.c -checks=* -- -fblocks foo.c
Where the set of arguments that go after the `--` is just the same set
you would have normally passed to clang.
Jon
>
> Cheers,
> Phi
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
--
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded
More information about the cfe-dev
mailing list