[cfe-dev] Patch for C++ namespaces
Doug Gregor
doug.gregor at gmail.com
Sun Apr 20 19:20:49 PDT 2008
On Sun, Apr 20, 2008 at 9:30 PM, Chris Lattner <clattner at apple.com> wrote:
> On Apr 20, 2008, at 4:52 PM, Argiris Kirtzidis wrote:
> > A unified way to walk all 'merged' declaration would be great. How
> > about I commit namespaces as it is (minus NamespaceScope), so that a
> > way to deal generally with merged decls would
> > consider NamespaceDecls too.
> >
>
> Makes sense to me! Note that Doug's recent patch proposes a way to
> handle merging, but it is (currently) specific to functiondecls.
I looked at Argiris's namespace patch, and we took exactly the same
approach to handling redeclarations: keep the original declaration,
and attach the new declaration onto a chain of previous declarations
rather than pushing it into scope.
Once the DenseMap<Decl*, Decl*> for previous declarations is
available, both functions and namespaces can easily use it (and other
entities that can be redeclared, of course).
- Doug
More information about the cfe-dev
mailing list