summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/enum-scoped.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-05-05 02:13:49 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-05-05 02:13:49 +0000
commit5cbeb75a994be6fd6a73f9d48a0a95337f743096 (patch)
treecd13a3b1ea1ac3ef5c581c7977a658c499337f4d /clang/test/SemaCXX/enum-scoped.cpp
parent5ee54086251b7380c2997ff090311cdb739c17ea (diff)
downloadbcm5719-llvm-5cbeb75a994be6fd6a73f9d48a0a95337f743096.tar.gz
bcm5719-llvm-5cbeb75a994be6fd6a73f9d48a0a95337f743096.zip
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
Diffstat (limited to 'clang/test/SemaCXX/enum-scoped.cpp')
-rw-r--r--clang/test/SemaCXX/enum-scoped.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/enum-scoped.cpp b/clang/test/SemaCXX/enum-scoped.cpp
index 909802335e4..142edd3893a 100644
--- a/clang/test/SemaCXX/enum-scoped.cpp
+++ b/clang/test/SemaCXX/enum-scoped.cpp
@@ -298,8 +298,8 @@ namespace PR18044 {
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 {
OpenPOWER on IntegriCloud