[cfe-commits] [Request for approval] Added basic source locations to Elaborated and DependentName types.

Abramo Bagnara abramo.bagnara at gmail.com
Fri May 14 07:55:42 PDT 2010


Il 13/05/2010 22:43, John McCall ha scritto:
> On May 13, 2010, at 2:09 AM, Abramo Bagnara wrote:
>> The attached patch improves support for locations inside Elaborated
>> and DependentName types.

I've committed the fixed patch in r103770.

> DependentNameType needs to be able to situationally store a
> TemplateSpecializationTypeLoc as its NextTypeLoc.  This is not going
> to be very clean.  The best solution would be to split
> DependentNameType in two, so that we have both DependentNameType
> (typename A<T>::foo) and DependentTemplateSpecializationType
> (A<T>::template B<int>).  If you're willing to do that refactor, that
> would be awesome;  otherwise, let me know and we'll get to it
> eventually.

There is something we do not fully understand and we would like to hear
an informed opinion, since probably we are missing some details of the
overall design and issues.

Even now, as far as we understand, an ElaboratedType can contain a
dependent type (correct?).

So, why wouldn't it be possible (or reasonable) to create some sort of
UnresolvedType node and let it be the inner node of an ElaboratedType?

This can represent everything a DependentName type can represent now
(correct?).

>> The next step should be adding source location to
>> NestedNameSpecifier.
> 
> I'm not sure this is the right approach;  I think it might be better
> to use a TypeLoc-like solution.  But we should talk about this
> separately.

I believed that NNS was a pure syntactic thing, do you think it's wrong
to store locations there?




More information about the cfe-commits mailing list