diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-01-10 01:33:14 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-01-10 01:33:14 +0000 |
commit | bdad7a2e21686296b78dac6190b78d11c996f6d7 (patch) | |
tree | a2695b7ffdfd95acfa1966fc6fd43fa38b419a9a /test/FixIt/fixit-cxx0x.cpp | |
parent | 8f0a403945b60a8a8a56a7721bb66f6b84ec129b (diff) |
Update C++11 scoped enumeration support to match the final proposal:
- reject definitions of enums within friend declarations
- require 'enum', not 'enum class', for non-declaring references to scoped
enumerations
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147824 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FixIt/fixit-cxx0x.cpp')
-rw-r--r-- | test/FixIt/fixit-cxx0x.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/FixIt/fixit-cxx0x.cpp b/test/FixIt/fixit-cxx0x.cpp index 9895c1f53c..28a96198bd 100644 --- a/test/FixIt/fixit-cxx0x.cpp +++ b/test/FixIt/fixit-cxx0x.cpp @@ -37,3 +37,12 @@ namespace SemiCommaTypo { f3 override, // expected-error {{expected ';' at end of declaration}} }; } + +namespace ScopedEnum { + enum class E { a }; + + enum class E b = E::a; // expected-error {{must use 'enum' not 'enum class'}} + struct S { + friend enum class E; // expected-error {{must use 'enum' not 'enum class'}} + }; +} |