diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-09-10 16:57:35 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-09-10 16:57:35 +0000 |
commit | e942bbe02b6fb332d1f13d38c6e1980b416cf89a (patch) | |
tree | e1dacc15d51066da2e7d6de19f6d41ddd135fd9a /test/SemaCXX/member-name-lookup.cpp | |
parent | 736d8a66062eeb25a4b63dcac36d1d4c261a02c4 (diff) | |
download | clang-e942bbe02b6fb332d1f13d38c6e1980b416cf89a.tar.gz |
When performing unqualified name lookup into a DeclContext, also look into
all of the parent DeclContexts that aren't represented within the
Scope chain. This fixes some name-lookup problems in out-of-line
definitions of members of nested classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81451 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/member-name-lookup.cpp')
-rw-r--r-- | test/SemaCXX/member-name-lookup.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaCXX/member-name-lookup.cpp b/test/SemaCXX/member-name-lookup.cpp index 9fcd922ddf..e95641b4bf 100644 --- a/test/SemaCXX/member-name-lookup.cpp +++ b/test/SemaCXX/member-name-lookup.cpp @@ -146,3 +146,13 @@ struct HasAnotherMemberType : HasMemberType1, HasMemberType2 { struct UsesAmbigMemberType : HasMemberType1, HasMemberType2 { type t; // expected-error{{member 'type' found in multiple base classes of different types}} }; + +struct X0 { + struct Inner { + static const int m; + }; + + static const int n = 17; +}; + +const int X0::Inner::m = n; |