<div class="post-text">
        <p>Hello,<br></p><p>I'm doing inter-procedural data-flow analysis with clang. I need to parse ASTs of several .c files together (to compute a fixed point I need to switch between functions in different files).</p>
<p>I've tried three options as described below.<br></p><p>As far as I understand from the discussion in the mailing list <a href="http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-August/023865.html" rel="nofollow">http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-August/023865.html</a>, there is no out-of-box solution for merging ASTs in clang. One option is to manually create a global symbol table for several units. My question is then (in the suggested solutions) how to  find 
the correspondence between the definitions of the same user-define type in different ASTs.<br></p>

<p>I've also looked at ASTImport class, but it does not support import of 
some AST nodes and also gives 'multiple definition' errors (even though there is no multiple definition). Can it be used to merge ASTs of source files rather than precompiled headers?</p>

<p>Finally, I've tried ASTImportAction but I don't understand which command-line parameters should be passed to the ClangTool for this action.<br></p>I would be grateful for any hint.<br>Thank you very much,<br>Yulia.<br>
</div>