diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:02:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:02:28 +0000 |
commit | 7442d6faa2719e4e7d33a7021c406c5a4facd74d (patch) | |
tree | c72b9241553fc9966179aba84f90f17bfa9235c3 /test/SemaCXX/zero-length-arrays.cpp | |
parent | b52119637f743680a99710ce5fdb6646da2772af (diff) |
Diffstat (limited to 'test/SemaCXX/zero-length-arrays.cpp')
-rw-r--r-- | test/SemaCXX/zero-length-arrays.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/SemaCXX/zero-length-arrays.cpp b/test/SemaCXX/zero-length-arrays.cpp index d86ab8666d53e..cca883adc4b5d 100644 --- a/test/SemaCXX/zero-length-arrays.cpp +++ b/test/SemaCXX/zero-length-arrays.cpp @@ -1,5 +1,6 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -// expected-no-diagnostics +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s // <rdar://problem/10228639> class Foo { @@ -12,6 +13,9 @@ public: class Bar { int foo_count; Foo foos[0]; +#if __cplusplus >= 201103L +// expected-note@-2 {{copy constructor of 'Bar' is implicitly deleted because field 'foos' has an inaccessible copy constructor}} +#endif Foo foos2[0][2]; Foo foos3[2][0]; @@ -23,5 +27,10 @@ public: void testBar() { Bar b; Bar b2(b); +#if __cplusplus >= 201103L +// expected-error@-2 {{call to implicitly-deleted copy constructor of 'Bar}} +#else +// expected-no-diagnostics +#endif b = b2; } |