Fix implementation of C++'s restrictions on using-declarations referring to enumerators:
* an unscoped enumerator whose enumeration is a class member is itself a class
member, so can only be the subject of a class-scope using-declaration.
* a scoped enumerator cannot be the subject of a class-scope using-declaration.
llvm-svn: 268594
diff --git a/clang/test/SemaCXX/enum-scoped.cpp b/clang/test/SemaCXX/enum-scoped.cpp
index 9098023..142edd3 100644
--- a/clang/test/SemaCXX/enum-scoped.cpp
+++ b/clang/test/SemaCXX/enum-scoped.cpp
@@ -298,8 +298,8 @@
int E::*p; // expected-error {{does not point into a class}}
using E::f; // expected-error {{no member named 'f'}}
- using E::a; // ok!
- E b = a;
+ using E::a; // expected-error {{using declaration cannot refer to a scoped enumerator}}
+ E b = a; // expected-error {{undeclared}}
}
namespace test11 {