[cfe-commits] [PATCH] First step towards adding a parent map to the ASTContext.

Richard Smith richard at metafoo.co.uk
Tue Jan 15 13:07:50 PST 2013


On Tue, Jan 15, 2013 at 1:31 AM, Manuel Klimek <klimek at google.com> wrote:
> Ping
>
>
> On Tue, Jan 8, 2013 at 1:31 PM, Manuel Klimek <klimek at google.com> wrote:
>>
>> This does not yet implement the LimitNode approach discussed via email,
>> but I want to get some opinions in what that interface should look like
>> and how we'd want it to behave. If there's agreement that this is
>> generally desirable, I'll pull the ASTTypeTraits into AST/.
>>
>> The impact of this is an O(n) in the number of nodes in the AST
>> reduction of complexity for certain kinds of matchers (as otherwise the
>> parent map gets recreated for every new MatchFinder).
>>
>> Open questions:
>> - if we implement a second version with a LimitNode, do we want to cache
>>   those results at all (it's hard, because of the
>>   multiple-parents-problem).
>> - do we want to leave the RAV implementation in ASTContext (which is
>>   already large), or pull it out into an ASTContextInternal header (or
>>   similar)?
>> - this introduces ast_type_traits::DynTypedNode into a more prominent
>>   location - if there's problems with that approach, now is the time to
>>   point it out to me :)

Could we avoid having multiple parents by providing the containing
Decl as context?



More information about the cfe-commits mailing list