diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-01-19 06:06:57 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-01-19 06:06:57 +0000 |
commit | e39fe72df7da662c195ef4bcd542d58ec87d5422 (patch) | |
tree | cc449e5f1361af6e5b9d77a24c04b912772bcf9d /test/SemaCXX/enum.cpp | |
parent | c1a35d97d3b1e743c54350d80c62e0895f31b59d (diff) |
When looking up enumerator names for redeclaration, use the
ForRedeclaration flag so that we don't look into base classes.
Fixes PR6061.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93862 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/enum.cpp')
-rw-r--r-- | test/SemaCXX/enum.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaCXX/enum.cpp b/test/SemaCXX/enum.cpp index f1b02f5d4c..47ae06ab0e 100644 --- a/test/SemaCXX/enum.cpp +++ b/test/SemaCXX/enum.cpp @@ -56,3 +56,14 @@ namespace test1 { enum enum4 { v4 = __LONG_MAX__ * 2UL }; int test4[is_same<__typeof(+v4), unsigned long>::value]; } + +// PR6061 +namespace PR6061 { + struct A { enum { id }; }; + struct B { enum { id }; }; + + struct C : public A, public B + { + enum { id }; + }; +} |