]> granicus.if.org Git - clang/commit
During name lookup, use redecl_iterator to walk over the redeclaration
authorDouglas Gregor <dgregor@apple.com>
Fri, 6 Jan 2012 22:05:37 +0000 (22:05 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 6 Jan 2012 22:05:37 +0000 (22:05 +0000)
commit0782ef2bd0ef5025ac6512cfa445a80a464c3b7f
tree44b0eac9ccc692c296a1489fb112a8c66dc9e25f
parentd97927d69b277120f8d403580c44acd84907d7b4
During name lookup, use redecl_iterator to walk over the redeclaration
chain to determine whether any declaration of the given entity is
visible, eliminating the redundant (and less efficient)
getPreviousDeclaration() implementation.

This tweak uncovered an omission in the handling of
RedeclarableTemplateDecl, where we weren't making sure to search for
additional redeclarations of a template in other module files. Things
would be cleaner if RedeclarableTemplateDecl actually used Redeclarable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147687 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaLookup.cpp
lib/Serialization/ASTReaderDecl.cpp