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 | eab9d6f9065b042d39fbaf9842c9d8cc968dd6d0 (patch) | |
tree | ae1948b1996d0c59ea4f597701504ea5e8caa25c /test/Parser/cxx-decl.cpp | |
parent | 3fe52ff7df93f7a928a15cc2cbf5134fdc0cec15 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160618 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/cxx-decl.cpp')
-rw-r--r-- | test/Parser/cxx-decl.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/Parser/cxx-decl.cpp b/test/Parser/cxx-decl.cpp index 57f33d826f..951cd3dfd1 100644 --- a/test/Parser/cxx-decl.cpp +++ b/test/Parser/cxx-decl.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -fsyntax-only -triple i386-linux %s +// RUN: %clang_cc1 -verify -fsyntax-only -triple i386-linux -pedantic %s int x(*g); // expected-error {{use of undeclared identifier 'g'}} @@ -44,7 +44,7 @@ class asm_class_test { void foo() __asm__("baz"); }; -enum { fooenum = 1 }; +enum { fooenum = 1, }; // expected-warning {{commas at the end of enumerator lists are a C++11 extension}} struct a { int Type : fooenum; @@ -125,5 +125,3 @@ test6a { ;// expected-error {{C++ requires a type specifier for all declarations // expected-error {{expected ';' after top level declarator}} int test6b; - - |