diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-01-10 21:27:55 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-01-10 21:27:55 +0000 |
| commit | c0a5d5bc4f7edab93b98204abebd59126af494b5 (patch) | |
| tree | b5c690cc823870b076efad2e0ab12099161a0745 /clang/test/Parser/cxx-decl.cpp | |
| parent | 78dcc03c3791097ebefa7590269329abe616b26d (diff) | |
| download | llvm-c0a5d5bc4f7edab93b98204abebd59126af494b5.zip llvm-c0a5d5bc4f7edab93b98204abebd59126af494b5.tar.gz llvm-c0a5d5bc4f7edab93b98204abebd59126af494b5.tar.bz2 | |
Downgrade bogus ExtWarn on duplicate 'friend' specifier to a Warning, and add a
Warning for a duplicate 'constexpr' specifier.
llvm-svn: 198956
Diffstat (limited to 'clang/test/Parser/cxx-decl.cpp')
| -rw-r--r-- | clang/test/Parser/cxx-decl.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/clang/test/Parser/cxx-decl.cpp b/clang/test/Parser/cxx-decl.cpp index 8c4c617..cc429f6 100644 --- a/clang/test/Parser/cxx-decl.cpp +++ b/clang/test/Parser/cxx-decl.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fsyntax-only -triple i386-linux -pedantic -fcxx-exceptions -fexceptions %s +// RUN: %clang_cc1 -verify -fsyntax-only -triple i386-linux -pedantic-errors -fcxx-exceptions -fexceptions %s -const char const *x10; // expected-warning {{duplicate 'const' declaration specifier}} +const char const *x10; // expected-error {{duplicate 'const' declaration specifier}} int x(*g); // expected-error {{use of undeclared identifier 'g'}} @@ -46,7 +46,7 @@ class asm_class_test { void foo() __asm__("baz"); }; -enum { fooenum = 1, }; // expected-warning {{commas at the end of enumerator lists are a C++11 extension}} +enum { fooenum = 1, }; // expected-error {{commas at the end of enumerator lists are a C++11 extension}} struct a { int Type : fooenum; @@ -81,7 +81,7 @@ namespace Commas { (global5), *global6, &global7 = global1, - &&global8 = static_cast<int&&>(global1), // expected-warning 2{{rvalue reference}} + &&global8 = static_cast<int&&>(global1), // expected-error 2{{rvalue reference}} S::a, global9, global10 = 0, @@ -212,14 +212,14 @@ namespace PR5066 { template<typename T> struct X {}; X<int N> x; // expected-error {{type-id cannot have a name}} - using T = int (*T)(); // expected-error {{type-id cannot have a name}} expected-warning {{C++11}} + using T = int (*T)(); // expected-error {{type-id cannot have a name}} expected-error {{C++11}} } namespace PR17255 { void foo() { typename A::template B<>; // expected-error {{use of undeclared identifier 'A'}} \ // expected-error {{expected a qualified name after 'typename'}} \ - // expected-warning {{'template' keyword outside of a template}} + // expected-error {{'template' keyword outside of a template}} } } @@ -232,6 +232,13 @@ namespace PR17567 { FooBar::~FooBar() {} // expected-error {{undeclared}} expected-error {{expected the class name}} } +namespace DuplicateFriend { + struct A { + friend void friend f(); // expected-warning {{duplicate 'friend' declaration specifier}} + friend struct B friend; // expected-warning {{duplicate 'friend' declaration specifier}} + }; +} + // PR8380 extern "" // expected-error {{unknown linkage language}} test6a { ;// expected-error {{C++ requires a type specifier for all declarations}} \ |
