Re: Allow tools to work without compilation database

2015-12-03 Thread Manuel Klimek via cfe-commits
Applied your patch, modified it a bit, and submitted r254599. Thanks! On Thu, Dec 3, 2015 at 11:15 AM Russell Wallace wrote: > Okay - I don't understand how the class works well enough to be certain > that will do the same thing, but if you do, I've no problem taking your > word for it. Should I

Re: Allow tools to work without compilation database

2015-12-03 Thread Russell Wallace via cfe-commits
Okay - I don't understand how the class works well enough to be certain that will do the same thing, but if you do, I've no problem taking your word for it. Should I resend the patch with that change? On Thu, Dec 3, 2015 at 9:56 AM, Manuel Klimek wrote: > -if (!Compilations) > - llvm::r

Re: Allow tools to work without compilation database

2015-12-03 Thread Manuel Klimek via cfe-commits
-if (!Compilations) - llvm::report_fatal_error(ErrorMessage); +if (!Compilations) { + errs() << "Compilation database not found - using default options\n"; + int argc = 1; + const char *argv[] = {"--"}; + Compilations.reset( + FixedCompilationDatabase::load

Allow tools to work without compilation database

2015-12-02 Thread Russell Wallace via cfe-commits
Per discussion at http://lists.llvm.org/pipermail/cfe-dev/2015-December/046321.html allow tools to work in the absence of a compilation database, but warn the user about the absence. Index: lib/Tooling/CommonOptionsParser.cpp === --- l