[cfe-dev] LibTooling in the absence of a compilation database

Manuel Klimek via cfe-dev cfe-dev at lists.llvm.org
Wed Dec 2 01:39:17 PST 2015


On Wed, Dec 2, 2015 at 10:35 AM Russell Wallace via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Tools built with LibTooling default to using a compilation database if one
> is available, which is good.
>
> In the case where a compilation database is not available, there is a
> problem: the default behavior is to exit with an error message, whereas in
> some cases the tool would be required to do the best it can anyway. This
> can be achieved by adding -- to the end of the command line, but this
> wouldn't be obvious to someone unfamiliar with Clang tools.
>
> One solution would be for the program to append -- to argv if it's not
> already present, but would this disable the default useful behavior of
> reading the compilation database if it is available?
>
> If so, is there a way for the program to say 'okay, check for a
> compilation database as normal, but if it's not present, let me know and
> I'll fill in some best-guess default options'?
>

The problem is that for C++ there really are no best guess default options.
If you have ideas for what they should be, please make a proposal.


> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20151202/3f9a1415/attachment.html>


More information about the cfe-dev mailing list