When we're performing name lookup for a tag, we still allow ourselves
authorDouglas Gregor <dgregor@apple.com>
Thu, 5 Jan 2012 01:11:47 +0000 (01:11 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 5 Jan 2012 01:11:47 +0000 (01:11 +0000)
commit5c193c7ed6eb50a6f96000f306727d988cde43d2
treefe18fae502378d81cc0acbf48c8210d990cc2198
parent31a8d051ddc88fb654ad676ffa0a90bb6decb0c8
When we're performing name lookup for a tag, we still allow ourselves
to see hidden declarations because every tag lookup is effectively a
redeclaration lookup. For example, image that

  struct foo;

is declared in a submodule that is known but hasn't been imported. If
someone later writes

  struct foo *foo_p;

then "struct foo" is either a reference or a redeclaration. To keep
the redeclaration chains sound, we treat it like a redeclaration for
name-lookup purposes.

llvm-svn: 147588
clang/include/clang/Sema/Lookup.h
clang/lib/Sema/SemaLookup.cpp
clang/test/Modules/Inputs/redecl-merge-top-explicit.h
clang/test/Modules/redecl-merge.m