[cfe-dev] [Analyzer] ASTMergeAction to dynamically merge in translation units

Manuel Klimek klimek at google.com
Fri Jul 17 03:45:06 PDT 2015


I do believe the right way to do this sort of analysis is to shard per TU,
output all the info you need in a format that fits your analysis, and then
do the analysis on that data after sorting it into shards again.
Anything that tries to build up huge ASTs will not scale beyond small
projects.

On Fri, Jul 17, 2015 at 12:38 PM hao/NoQ <noqnoqneo at gmail.com> wrote:

> > dynamically merge in its corresponding AST (i.e. by loading a file from
> disk and using ASTMergeAction).
>
> A few problems with this approach include figuring out which
> translation unit needs to be picked up for merging (something you
> can't figure out from within a single clang compiler instance, without
> two-pass run through the build), incompleteness of the current
> implementation of the ASTImporter class (even though it has recently
> been significantly improved), and also there are numerous troubles
> with merging you may encounter, depending on the complexity of your
> project (eg., if the project is compiled for multiple architectures
> simultaneously, or has conflicting definitions in multiple translation
> units, etc.).
>
> Our team once had a look at this as well and made a simple
> proof-of-concept implementation, but it's not any close to
> release-able yet.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150717/f1179775/attachment.html>


More information about the cfe-dev mailing list