diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-02-20 20:19:27 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-02-20 20:19:27 +0000 |
| commit | b19337fbe474a0086d0154421d4b2cedfa8d92a2 (patch) | |
| tree | c43b04b310e52f0c03351e58fbe8b1ebc90c3420 /clang/test | |
| parent | 1366a61242b6184df1638e295996980cb6eae122 (diff) | |
| download | bcm5719-llvm-b19337fbe474a0086d0154421d4b2cedfa8d92a2.tar.gz bcm5719-llvm-b19337fbe474a0086d0154421d4b2cedfa8d92a2.zip | |
PR15311: Finish implementation of the suggested resolution of core issue 1488,
which allows grouping parens in an abstract-pack-declarator. This was already
mostly implemented, but missed some cases. Add an ExtWarn for use of this
extension until CWG ratifies it.
llvm-svn: 175660
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/FixIt/fixit-cxx0x.cpp | 2 | ||||
| -rw-r--r-- | clang/test/Parser/cxx0x-ambig.cpp | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/clang/test/FixIt/fixit-cxx0x.cpp b/clang/test/FixIt/fixit-cxx0x.cpp index 3884c64516b..1f6275f933b 100644 --- a/clang/test/FixIt/fixit-cxx0x.cpp +++ b/clang/test/FixIt/fixit-cxx0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -std=c++11 %s +// RUN: %clang_cc1 -verify -std=c++11 -Wno-anonymous-pack-parens %s // RUN: cp %s %t // RUN: not %clang_cc1 -x c++ -std=c++11 -fixit %t // RUN: %clang_cc1 -Wall -pedantic -x c++ -std=c++11 %t diff --git a/clang/test/Parser/cxx0x-ambig.cpp b/clang/test/Parser/cxx0x-ambig.cpp index 96e200642b5..ac9c75ea682 100644 --- a/clang/test/Parser/cxx0x-ambig.cpp +++ b/clang/test/Parser/cxx0x-ambig.cpp @@ -110,7 +110,7 @@ namespace ellipsis { void f(S(...args[sizeof(T)])); // expected-note {{here}} void f(S(...args)[sizeof(T)]); // expected-error {{redeclared}} expected-note {{here}} void f(S ...args[sizeof(T)]); // expected-error {{redeclared}} - void g(S(...[sizeof(T)])); // expected-note {{here}} + void g(S(...[sizeof(T)])); // expected-note {{here}} expected-warning {{ISO C++11 requires a parenthesized pack declaration to have a name}} void g(S(...)[sizeof(T)]); // expected-error {{function cannot return array type}} void g(S ...[sizeof(T)]); // expected-error {{redeclared}} void h(T(...)); // function type, expected-error {{unexpanded parameter pack}} @@ -125,5 +125,8 @@ namespace ellipsis { void j(T(T...)); // expected-error {{unexpanded parameter pack}} void k(int(...)(T)); // expected-error {{cannot return function type}} void k(int ...(T)); + void l(int(&...)(T)); // expected-warning {{ISO C++11 requires a parenthesized pack declaration to have a name}} + void l(int(*...)(T)); // expected-warning {{ISO C++11 requires a parenthesized pack declaration to have a name}} + void l(int(S<int>::*...)(T)); // expected-warning {{ISO C++11 requires a parenthesized pack declaration to have a name}} }; } |

