[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] purpose of "IASTNode point" arguments?
|
I think passing the definition from the outside will not work because at the point of instantiation you no longer know about the definition in which the dependent name has been used. I have not thought about this enough, but I guess we could store these definitions in the evaluation objects.
Markus.
-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Nathan Ridge
Sent: Wed, 06. 02. 2013 06:09
To: CDT Mailing List
Subject: Re: [cdt-dev] purpose of "IASTNode point" arguments?
> Hi Nate,
> Look like the cdt implementation deviates from the standard here. I
> think you need to look at
> 14.6.4 Dependent name resolution:
> In resolving dependent names, names from the following sources are considered:
> - Declarations that are visible at the point of definition of the template.
> - Declarations from namespaces associated with the types of the
> function arguments both from the instantiation context (14.6.4.1) and from the definition context.
> ...
> Markus.
Here is my proposed solution:
- Wherever an "IASTNode point" is currently passed, pass two IASTNodes
instead: one for the point of instantiation, and another for the
point of definition.
- In places where an "IASTNode point" is originated, originate both a
point of instantiation and a point of definition. For example,
AbstractCPPClassSpecializationScope.getBindings() will continue to pass
lookup.getLookupPoint() as the point of instantiation, but it will also
pass binding.getDefinition() as the point of definition to
ICPPClassSpecialization.specializeMember().
- In places where the "IASTNode point" is used to perform lookups (such as
CPPSemantics.findOverloadedOperator()), do regular lookup only starting
from the point of definition, and Koenig lookup only starting from the
point of instantiation.
- For convenience, the two points can be bundled into a class LookupContext.
Does this seem reasonable?
Thanks,
Nate
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev