[cfe-dev] [PATCH] : Proper name lookup for namespaces

Argiris Kirtzidis akyrtzi at gmail.com
Tue May 6 19:06:15 PDT 2008


Hi,

The attached patch contains changes to support proper name lookup for 
namespaces.
It is mostly an overhaul of the IdentifierResolver:

-It exposes an iterator interface to get all decls through the scope chain:
  for (IdentifierResolver::iterator
       I = IdResolver.begin(II, CurContext), E = IdResolver.end(II); I 
!= E; ++I)
    if ((*I)->getIdentifierNamespace() & NS)
      return *I;

-The semantic staff (checking IdentifierNamespace and Doug's checking 
for shadowed tags were moved out of IdentifierResolver and back into 
Sema. IdentifierResolver just gives an iterator for iterating over all 
reachable decls of an identifier.

-Fixes bug: http://llvm.org/bugs/show_bug.cgi?id=2275


-Argiris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cxx-namespaces-2.patch
Type: text/x-diff
Size: 31300 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080506/94bf15bb/attachment.patch>


More information about the cfe-dev mailing list