diff options
| author | Charles Li <charles.li@sony.com> | 2017-02-24 22:22:05 +0000 |
|---|---|---|
| committer | Charles Li <charles.li@sony.com> | 2017-02-24 22:22:05 +0000 |
| commit | 9ea0817c5ac5fa59bb56dc78eb335f074e33a2c8 (patch) | |
| tree | e6b5c665e6b2a8b5808ebbfe2dcf96a96652d3cb /clang/test/SemaCXX/zero-length-arrays.cpp | |
| parent | 018d13597acdcfcec0144076a9d546dcdd30803b (diff) | |
| download | bcm5719-llvm-9ea0817c5ac5fa59bb56dc78eb335f074e33a2c8.tar.gz bcm5719-llvm-9ea0817c5ac5fa59bb56dc78eb335f074e33a2c8.zip | |
[Test] Make Lit tests C++11 compatible #9
[Test] Make Lit tests C++11 compatible #9
Differential Revision: https://reviews.llvm.org/D20710
llvm-svn: 296184
Diffstat (limited to 'clang/test/SemaCXX/zero-length-arrays.cpp')
| -rw-r--r-- | clang/test/SemaCXX/zero-length-arrays.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/zero-length-arrays.cpp b/clang/test/SemaCXX/zero-length-arrays.cpp index d86ab8666d5..cca883adc4b 100644 --- a/clang/test/SemaCXX/zero-length-arrays.cpp +++ b/clang/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; } |

