diff options
author | Richard Trieu <rtrieu@google.com> | 2013-04-23 02:47:36 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2013-04-23 02:47:36 +0000 |
commit | ed5a292592c61f1b0d2da60dddea2fc11fb3f157 (patch) | |
tree | bd9bd7fbe6b36d4819bf3db342e0f98c430a2155 /test/SemaCXX/warn-c++11-extensions.cpp | |
parent | 2545b1d99942080bac4a74cda92c620123d0d6e9 (diff) | |
download | clang-ed5a292592c61f1b0d2da60dddea2fc11fb3f157.tar.gz |
Warn that scoped enumerations are a C++11 extenstion when compiling in
C++98 mode. This improves on the previous diagnostic message of:
error: expected identifier or '{'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/warn-c++11-extensions.cpp')
-rw-r--r-- | test/SemaCXX/warn-c++11-extensions.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/SemaCXX/warn-c++11-extensions.cpp b/test/SemaCXX/warn-c++11-extensions.cpp index 8f35171119..bf8612aa39 100644 --- a/test/SemaCXX/warn-c++11-extensions.cpp +++ b/test/SemaCXX/warn-c++11-extensions.cpp @@ -5,3 +5,5 @@ long long ll1 = // expected-warning {{'long long' is a C++11 extension}} unsigned long long ull1 = // expected-warning {{'long long' is a C++11 extension}} 42ULL; // expected-warning {{'long long' is a C++11 extension}} +enum struct E1 { A, B }; // expected-warning {{scoped enumerations are a C++11 extension}} +enum class E2 { C, D }; // expected-warning {{scoped enumerations are a C++11 extension}} |