diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-04-01 21:43:41 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-04-01 21:43:41 +0000 |
commit | 725fe0ede4c5355666a300f4fd7dae9454f35a37 (patch) | |
tree | 099e9e3357b2f3de4b851588f3eae88944202733 /test/SemaCXX/enum-scoped.cpp | |
parent | e40e496fcec9381d75c0f72a15207902b08838e1 (diff) |
PR15633: Note that we are EnteringContext when parsing the nested name
specifier for an enumeration. Also fix a crash-on-invalid if a non-dependent
name specifier is used to declare an enum template.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178502 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/enum-scoped.cpp')
-rw-r--r-- | test/SemaCXX/enum-scoped.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaCXX/enum-scoped.cpp b/test/SemaCXX/enum-scoped.cpp index a1f911d79d..d01000d22b 100644 --- a/test/SemaCXX/enum-scoped.cpp +++ b/test/SemaCXX/enum-scoped.cpp @@ -252,3 +252,17 @@ namespace pr13128 { enum class E { C }; }; } + +namespace PR15633 { + template<typename T> struct A { + struct B { + enum class E : T; + enum class E2 : T; + }; + }; + template<typename T> enum class A<T>::B::E { e }; + template class A<int>; + + struct B { enum class E; }; + template<typename T> enum class B::E { e }; // expected-error {{enumeration cannot be a template}} +} |