The basic idea here is to start to unify how name lookup is performed, so that:
Names are always looked up using Scopes
All Scopes are based on the named declarations within some ContainerDecl
This PR thus includes a few changes to make things be ContainerDecls that weren't before, and then a change to make the Scope type use the ContainerDecl to enumerate members, rather than maintaining its own Dictionary.
Nothing really interesting happens in this change (it shouldn't alter functionality at all), but it should make it possible for subsequent changes to remove the various special-case lookup rules being employed.
The basic idea here is to start to unify how name lookup is performed, so that:
Scope
sScope
s are based on the named declarations within someContainerDecl
This PR thus includes a few changes to make things be
ContainerDecl
s that weren't before, and then a change to make theScope
type use theContainerDecl
to enumerate members, rather than maintaining its ownDictionary
.Nothing really interesting happens in this change (it shouldn't alter functionality at all), but it should make it possible for subsequent changes to remove the various special-case lookup rules being employed.