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)
commit5407920f82618114a66e92bf5dad280f42a4075c
tree2b2f9b5a738d6c78f9f8730452f72996bd0eedc8
parent9a5b242d3ca460a755599f867eb1d8903e8ee782
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.

llvm-svn: 147687
clang/lib/Sema/SemaLookup.cpp
clang/lib/Serialization/ASTReaderDecl.cpp