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 | 0f8ee22655a824663a51cc1e3f1725a11043b5be (patch) | |
tree | 08edfa4b6007a314df4a278f9035688626b1f91f /clang/test/FixIt/fixit-cxx0x.cpp | |
parent | 38ef9a9b940f6672876cc9209512d513e4a46a34 (diff) | |
download | bcm5719-llvm-0f8ee22655a824663a51cc1e3f1725a11043b5be.tar.gz bcm5719-llvm-0f8ee22655a824663a51cc1e3f1725a11043b5be.zip |
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
llvm-svn: 147824
Diffstat (limited to 'clang/test/FixIt/fixit-cxx0x.cpp')
-rw-r--r-- | clang/test/FixIt/fixit-cxx0x.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/FixIt/fixit-cxx0x.cpp b/clang/test/FixIt/fixit-cxx0x.cpp index 9895c1f53c2..28a96198bd0 100644 --- a/clang/test/FixIt/fixit-cxx0x.cpp +++ b/clang/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'}} + }; +} |