[PATCH] D39799: [Tooling] Use FixedCompilationDatabase when `compile_flags.txt` is found.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 8 06:15:33 PST 2017


sammccall created this revision.
Herald added a subscriber: ilya-biryukov.

This is an alternative to JSONCompilationDatabase for simple projects that
don't use a build system such as CMake.
(You can also drop one in ~, to make your tools use e.g. C++11 by default)

There's no facility for varying flags per-source-file or per-machine.
Possibly this could be accommodated backwards-compatibly using cpp, but even if
not the simplicity seems worthwhile for the cases that are addressed.

Tested with clangd, works great! (requires clangd restart)


https://reviews.llvm.org/D39799

Files:
  docs/JSONCompilationDatabase.rst
  include/clang/Tooling/CompilationDatabase.h
  lib/Tooling/CompilationDatabase.cpp
  test/Tooling/fixed-database.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39799.122081.patch
Type: text/x-patch
Size: 3999 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171108/478a5dad/attachment.bin>


More information about the cfe-commits mailing list