diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-07-23 05:45:25 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-07-23 05:45:25 +0000 |
commit | 87f5dc53b23ebe4dceb0a2354d83d96f07a1024e (patch) | |
tree | cb997819257dc6ee1b990bc5e335034f37455847 /clang/test/Parser/cxx-class.cpp | |
parent | 2694c05e8692fb95dbd9152a652394daa05d14a3 (diff) | |
download | bcm5719-llvm-87f5dc53b23ebe4dceb0a2354d83d96f07a1024e.tar.gz bcm5719-llvm-87f5dc53b23ebe4dceb0a2354d83d96f07a1024e.zip |
Add diagnostics for comma at end of enum and for extra semicolon at namespace
scope to -Wc++11-extensions. Move extra semicolon after member function
definition diagnostic out of -pedantic, since C++ allows a single semicolon
there. Keep it in -Wextra-semi, though, since it's still questionable.
llvm-svn: 160618
Diffstat (limited to 'clang/test/Parser/cxx-class.cpp')
-rw-r--r-- | clang/test/Parser/cxx-class.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/test/Parser/cxx-class.cpp b/clang/test/Parser/cxx-class.cpp index 75e3fbacc46..feccba85cf0 100644 --- a/clang/test/Parser/cxx-class.cpp +++ b/clang/test/Parser/cxx-class.cpp @@ -12,11 +12,15 @@ protected: int : 1, : 2; public: + void m0() {}; // ok, one extra ';' is permitted + void m1() {} + ; // ok, one extra ';' is permitted void m() { int l = 2; - }; // expected-warning{{extra ';' after function definition}} + };; // expected-warning{{extra ';' after member function definition}} template<typename T> void mt(T) { } + ; ; // expected-warning{{extra ';' inside a class}} virtual int vf() const volatile = 0; |