]> granicus.if.org Git - clang/commit
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)
commit447af24a003aa8d0dc7317a56f06f5b8361f8808
tree7c1662e63b5c2419ec98b5b8eb49c31a12c6681a
parent79430e9983f5e67a378fc1f50cd6278f2cea8259
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147588 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Lookup.h
lib/Sema/SemaLookup.cpp
test/Modules/Inputs/redecl-merge-top-explicit.h
test/Modules/redecl-merge.m