[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    Re: [cfe-dev] Patch for C++ namespaces
From:       "Doug Gregor" <doug.gregor () gmail ! com>
Date:       2008-04-21 2:20:49
Message-ID: 24b520d20804201920g2e4d5186q72974022de50d41d () mail ! gmail ! com
[Download RAW message or body]

On Sun, Apr 20, 2008 at 9:30 PM, Chris Lattner <clattner@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
_______________________________________________
cfe-dev mailing list
cfe-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic