[cfe-dev] [PATCH] get access to all files of compilation database

Manuel Klimek klimek at google.com
Thu Jul 12 23:56:01 PDT 2012

On Thu, Jul 12, 2012 at 3:39 PM, Tobias Koenig <tobias.koenig at kdab.com> wrote:
> Hej,
> when implementing some static code analysis tool based on clang, you often
> want to introspect the complete code base of a project. With the current API,
> you have to specify the list of files explicitly by passing them as second
> parameter to the constructor of tooling::ClangTool and
> the common approach seems to be to pass in this list as command line
> parameters to your application.
> Now I wonder whether the CompilationDatabase class (which has loaded all the
> compilation information from compile_commands.json already) could provide a
> getter method to retrieve the list of files and passing it to
> tooling::ClangTool directly.
> Attached is a patch for that. No idea how to handle the usage of
> FixedCompilationDatabase in this case though.
> Any suggestions, objections, comments?


apart from "." missing at the end of the \brief comments :)

Do you have commit access?

> Ciao,
> Tobias
> --
> Tobias Koenig | tobias.koenig at kdab.com | Developer
> KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
> Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090
> KDAB - Qt Experts - Platform-independent software solutions
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

More information about the cfe-dev mailing list