diff options
author | Charles Li <charles_li@playstation.sony.com> | 2015-11-17 20:25:05 +0000 |
---|---|---|
committer | Charles Li <charles_li@playstation.sony.com> | 2015-11-17 20:25:05 +0000 |
commit | e7cbb3ed4fc793fe599d35d780c4d8fda9048aa0 (patch) | |
tree | e4f5b4b315885a373d555ce54df36173e16837aa /clang/test/SemaCXX/constructor-initializer.cpp | |
parent | de642cef2c9e18a7943613809b085789e16fa562 (diff) | |
download | bcm5719-llvm-e7cbb3ed4fc793fe599d35d780c4d8fda9048aa0.tar.gz bcm5719-llvm-e7cbb3ed4fc793fe599d35d780c4d8fda9048aa0.zip |
[Lit Test] Updated 34 Lit tests to be C++11 compatible.
Added expected diagnostics new to C++11.
Expanded RUN line to: default, C++98/03 and C++11.
llvm-svn: 253371
Diffstat (limited to 'clang/test/SemaCXX/constructor-initializer.cpp')
-rw-r--r-- | clang/test/SemaCXX/constructor-initializer.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/clang/test/SemaCXX/constructor-initializer.cpp b/clang/test/SemaCXX/constructor-initializer.cpp index e3ab610da7c..c5de33cedb9 100644 --- a/clang/test/SemaCXX/constructor-initializer.cpp +++ b/clang/test/SemaCXX/constructor-initializer.cpp @@ -1,4 +1,7 @@ // RUN: %clang_cc1 -Wreorder -fsyntax-only -verify %s +// RUN: %clang_cc1 -Wreorder -fsyntax-only -verify -std=c++98 %s +// RUN: %clang_cc1 -Wreorder -fsyntax-only -verify -std=c++11 %s + class A { int m; public: @@ -98,9 +101,11 @@ struct Current : Derived { // expected-error {{member initializer 'NonExisting' does not name a non-static data member or}} }; -struct M { // expected-note 2 {{candidate constructor (the implicit copy constructor)}} \ - // expected-note {{declared here}} \ - // expected-note {{declared here}} +struct M { // expected-note 2 {{candidate constructor (the implicit copy constructor)}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 2 {{candidate constructor (the implicit move constructor) not viable}} +#endif +// expected-note@-4 2 {{'M' declared here}} M(int i, int j); // expected-note 2 {{candidate constructor}} }; @@ -233,7 +238,13 @@ namespace PR7402 { // <rdar://problem/8308215>: don't crash. // Lots of questionable recovery here; errors can change. namespace test3 { - class A : public std::exception {}; // expected-error {{undeclared identifier}} expected-error {{expected class name}} expected-note 2 {{candidate}} + class A : public std::exception {}; // expected-error {{undeclared identifier}} expected-error {{expected class name}} + // expected-note@-1 {{candidate constructor (the implicit copy constructor) not viable}} +#if __cplusplus >= 201103L // C++11 or later + // expected-note@-3 {{candidate constructor (the implicit move constructor) not viable}} +#endif + // expected-note@-5 {{candidate constructor (the implicit default constructor) not viable}} + class B : public A { public: B(const String& s, int e=0) // expected-error {{unknown type name}} |