[Lit Test] Updated 26 Lit tests to be C++11 compatible.
Expected diagnostics have been expanded to vary by C++ dialect.
RUN line has also been expanded to: default, C++98/03 and C++11.
llvm-svn: 252785
diff --git a/clang/test/SemaCXX/copy-initialization.cpp b/clang/test/SemaCXX/copy-initialization.cpp
index ea2db0c..d219ee5 100644
--- a/clang/test/SemaCXX/copy-initialization.cpp
+++ b/clang/test/SemaCXX/copy-initialization.cpp
@@ -1,4 +1,7 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
+
class X {
public:
explicit X(const X&); // expected-note {{candidate constructor}}
@@ -58,7 +61,10 @@
namespace Ex2 {
struct S {
- S(S&&); // expected-warning {{C++11}}
+ S(S&&);
+#if __cplusplus <= 199711L // C++03 or earlier modes
+ // expected-warning@-2 {{rvalue references are a C++11 extension}}
+#endif
S(int);
};
const S a(0);