[cfe-dev] Lazily parsing additional source files

Manuel Klimek klimek at google.com
Fri May 23 07:50:28 PDT 2014


+richardsmith, the C++-modules-man

On Fri, May 23, 2014 at 4:45 PM, Gábor Horváth <xazax.hun at gmail.com> wrote:

> Thanks, that is a good point. Do yo know what is the current status of
> module support for C++? Is it mature enough to be used? If not mature
> enough yet is it worth for me to start working on it (so it is less effort
> to make them work with regular translation units than creating my own lazy
> parsing logic)?
>

I assume it's stable for C/Obj-C, as that's what Apple uses it for (afaik).
Richard is currently making lots of progress on getting it ready for C++.

It just seems to me like adding a second way to lazily pull in parts of the
AST would be a waste of engineering time (and very hard to do without the
change in language restrictions that modules impose).

Cheers,
/Manuel



>
> Cheers,
> Gábor
>
>
> On 23 May 2014 16:10, Manuel Klimek <klimek at google.com> wrote:
>
>> On Mon, May 19, 2014 at 8:37 PM, Gábor Horváth <xazax.hun at gmail.com>wrote:
>>
>>> Hi!
>>>
>>> I am working on a Google Summer of Code project to improve the Clang
>>> Static Analyzer. In that project it would be essential to parse external
>>> source files and inject AST into the translation unit that is being
>>> compiled. The external files would contain definitons that are being looked
>>> up. The goal would be to avoid runtime cost if no lookup is required. So
>>> basicly I want to add new code lazily to an existing AST after parsing is
>>> done by injecting new source code.
>>>
>>
>> Isn't that exactly what modules solve?
>>
>> Cheers,
>> /Manuel
>>
>>
>>>
>>> Moreover some type information may not be available in those external
>>> source files, so type information in the translation unit that is being
>>> analyzed should be utilized.
>>>
>>> What do you think, what would be the most efficient and elegant way to
>>> approach this problem?
>>>
>>> Thanks in advance,
>>> Gábor
>>>
>>> _______________________________________________
>>> 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/20140523/f3dbc559/attachment.html>


More information about the cfe-dev mailing list