[cfe-dev] Clang beginner - how to parse multiple files?
yaakov.davis at gmail.com
Thu Apr 5 12:50:52 PDT 2012
OK, thanks for the detailed info, I'll look into the linking process.
On Apr 5, 2012 10:39 PM, "Douglas Gregor" <dgregor at apple.com> wrote:
> On Apr 5, 2012, at 12:15 PM, Yaakov Davis <yaakov.davis at gmail.com> wrote:
> > Can the different compilers use the same ASTContext?
> No, they must have different ASTContexts.
> > E.g. say a.cpp contains Foo::bar() and b.cpp contains Foo::bar2(); will
> the Foo type in the semantic DeclContext contain both foo and foo2 after
> parsing both files?
> No, it won't. Separate translation units are separate until something
> comes in to link them together.
> > Could you please provide an example how to setup the parsers?
> Sorry, I don't have time to write up a complete example now, but this kind
> of thing will get a lot easier soon with the current work on Tooling
> - Doug
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev