diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-15 05:09:34 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-15 05:09:34 +0000 |
| commit | 5d164bc5e0058b5e16158130fed8cba7114d87df (patch) | |
| tree | 46a7267bb32d95d3fedcfb190e1136d1137c4a9e /clang/test/SemaCXX/cxx98-compat-pedantic.cpp | |
| parent | ea97a05fc54b38715e9ae87c290e338bfc1725e9 (diff) | |
| download | bcm5719-llvm-5d164bc5e0058b5e16158130fed8cba7114d87df.tar.gz bcm5719-llvm-5d164bc5e0058b5e16158130fed8cba7114d87df.zip | |
Implement -Wc++98-compat warnings for the parser.
llvm-svn: 142056
Diffstat (limited to 'clang/test/SemaCXX/cxx98-compat-pedantic.cpp')
| -rw-r--r-- | clang/test/SemaCXX/cxx98-compat-pedantic.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/cxx98-compat-pedantic.cpp b/clang/test/SemaCXX/cxx98-compat-pedantic.cpp index 2ca0ae4d1ec..b1fd807e759 100644 --- a/clang/test/SemaCXX/cxx98-compat-pedantic.cpp +++ b/clang/test/SemaCXX/cxx98-compat-pedantic.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -std=c++11 -Wc++98-compat-pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++11 -Wc++98-compat -Werror %s // RUN: %clang_cc1 -fsyntax-only -std=c++98 -Werror %s // -Wc++98-compat-pedantic warns on C++11 features which we accept without a @@ -9,3 +10,9 @@ #define VA_MACRO(x, ...) x // expected-warning {{variadic macros are incompatible with C++98}} VA_MACRO(,x) // expected-warning {{empty macro argument list is incompatible with C++98}} + +; // expected-warning {{extra ';' outside of a function is incompatible with C++98}} + +enum Enum { + Enum_value, // expected-warning {{commas at the end of enumerator lists are incompatible with C++98}} +}; |

