[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
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