diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-08 15:38:36 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-08 15:38:36 +0000 |
commit | 1237259bda343504cc0bd3cfe2198bdeea2b2fdf (patch) | |
tree | 2ed7b8d2121610d1d156ba5d1dc088c094960449 /test/SemaCXX/using-directive.cpp | |
parent | 155fd79b3a6dd25fbac1716fa3f8148de1e53c49 (diff) |
When performing unqualified name lookup in C++, don't look directly
into transparent contexts; instead, we'll look into their nearest
enclosing non-transparent contexts further up the stack. Fixes PR5479.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90859 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/using-directive.cpp')
-rw-r--r-- | test/SemaCXX/using-directive.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaCXX/using-directive.cpp b/test/SemaCXX/using-directive.cpp index 51f347dc7a..b7583f27cb 100644 --- a/test/SemaCXX/using-directive.cpp +++ b/test/SemaCXX/using-directive.cpp @@ -112,3 +112,12 @@ using namespace Alias; void testAlias() { inAliased(); } + +namespace N { void f2(int); } + +extern "C++" { + using namespace N; + void f3() { f2(1); } +} + +void f4() { f2(1); } |