[cfe-dev] Merging Multiple AST

Ridwan Shariffdeen via cfe-dev cfe-dev at lists.llvm.org
Wed Jul 18 01:14:18 PDT 2018


Hi,

I am working on generating an AST for a given source code. I am using the
tool Bear (https://github.com/rizsotto/Bear) to capture the make commands
in order to generate the compilation database. Analyzing the database I
find multiple compile commands for the same source file with different
arguments. Reviewing further it uses different command arguments to compile
the source file. Hence for each compile command, I get different AST. I am
using ClangTool::buildASTs() method to generate the ASTs.

How can I merge these multiple ASTs generated from the same code? Is it
possible to just create all the AST's and create the final AST? or any
other method to aggregate?

Any help in this regard is highly appreciated.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180718/e5060356/attachment.html>


More information about the cfe-dev mailing list