Author: lcharles Date: Tue Nov 17 14:25:05 2015 New Revision: 253371 URL: http://llvm.org/viewvc/llvm-project?rev=253371&view=rev Log: [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. Modified: cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp cfe/trunk/test/CXX/basic/basic.scope/basic.scope.hiding/p2.cpp cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p2.cpp cfe/trunk/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp cfe/trunk/test/CXX/temp/temp.param/p3.cpp cfe/trunk/test/CXX/temp/temp.spec/temp.explicit/p1.cpp cfe/trunk/test/OpenMP/for_reduction_messages.cpp cfe/trunk/test/OpenMP/for_simd_reduction_messages.cpp cfe/trunk/test/OpenMP/parallel_for_reduction_messages.cpp cfe/trunk/test/OpenMP/parallel_for_simd_reduction_messages.cpp cfe/trunk/test/OpenMP/parallel_reduction_messages.cpp cfe/trunk/test/OpenMP/parallel_sections_reduction_messages.cpp cfe/trunk/test/OpenMP/sections_reduction_messages.cpp cfe/trunk/test/OpenMP/simd_reduction_messages.cpp cfe/trunk/test/OpenMP/teams_reduction_messages.cpp cfe/trunk/test/SemaCXX/constructor-initializer.cpp cfe/trunk/test/SemaCXX/converting-constructor.cpp cfe/trunk/test/SemaCXX/crashes.cpp cfe/trunk/test/SemaCXX/default1.cpp cfe/trunk/test/SemaCXX/direct-initializer.cpp cfe/trunk/test/SemaCXX/expressions.cpp cfe/trunk/test/SemaCXX/namespace.cpp cfe/trunk/test/SemaCXX/overload-call-copycon.cpp cfe/trunk/test/SemaCXX/overloaded-builtin-operators.cpp cfe/trunk/test/SemaCXX/vector.cpp cfe/trunk/test/SemaTemplate/class-template-ctor-initializer.cpp cfe/trunk/test/SemaTemplate/constructor-template.cpp cfe/trunk/test/SemaTemplate/default-expr-arguments.cpp cfe/trunk/test/SemaTemplate/fun-template-def.cpp cfe/trunk/test/SemaTemplate/qualified-names-diag.cpp Modified: cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp (original) +++ cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // 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 namespace A { class A { @@ -20,6 +22,9 @@ namespace D { namespace C { class C {}; // expected-note {{candidate constructor (the implicit copy constructor) not viable: no known conversion from 'B::B' to 'const C::C &' for 1st argument}} +#if __cplusplus >= 201103L // C++11 or later + // expected-note@-2 {{candidate constructor (the implicit move constructor) not viable: no known conversion from 'B::B' to 'C::C &&' for 1st argument}} +#endif void func(C); // expected-note {{'C::func' declared here}} \ // expected-note {{passing argument to parameter here}} C operator+(C,C); Modified: cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp (original) +++ cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // 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 namespace Ints { int zero = 0; // expected-note {{candidate found by name lookup is 'Ints::zero'}} @@ -31,7 +33,11 @@ void test() { } namespace Numbers { - struct Number { // expected-note 2 {{candidate}} + struct Number { // expected-note 2 {{candidate constructor (the implicit copy constructor) not viable}} +#if __cplusplus >= 201103L // C++11 or later + // expected-note@-2 2 {{candidate constructor (the implicit move constructor) not viable}} +#endif + explicit Number(double d) : d(d) {} double d; }; @@ -66,7 +72,11 @@ void test3() { namespace inline_ns { int x; // expected-note 2{{found}} - inline namespace A { // expected-warning {{C++11}} + inline namespace A { +#if __cplusplus <= 199711L // C++03 or earlier + // expected-warning@-2 {{inline namespaces are a C++11 feature}} +#endif + int x; // expected-note 2{{found}} int y; // expected-note 2{{found}} } Modified: cfe/trunk/test/CXX/basic/basic.scope/basic.scope.hiding/p2.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/basic/basic.scope/basic.scope.hiding/p2.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/CXX/basic/basic.scope/basic.scope.hiding/p2.cpp (original) +++ cfe/trunk/test/CXX/basic/basic.scope/basic.scope.hiding/p2.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // 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 // rdar4641403 namespace N { @@ -34,7 +36,10 @@ namespace PR17731 { struct S c = b; } { - struct S { S() {} }; // expected-note {{candidate}} + struct S { S() {} }; // expected-note {{candidate constructor (the implicit copy constructor) not viable}} +#if __cplusplus >= 201103L // C++11 or later + // expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}} +#endif int a = S(); // expected-error {{no viable conversion from 'S'}} struct S c = b; // expected-error {{no viable conversion from 'struct S'}} } @@ -50,7 +55,10 @@ namespace PR17731 { struct S c = b; } { - struct S { S() {} }; // expected-note {{candidate}} + struct S { S() {} }; // expected-note {{candidate constructor (the implicit copy constructor) not viable}} +#if __cplusplus >= 201103L // C++11 or later + // expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}} +#endif int a = S(); // expected-error {{no viable conversion from 'S'}} struct S c = b; // expected-error {{no viable conversion from 'struct S'}} } Modified: cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp (original) +++ cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp Tue Nov 17 14:25:05 2015 @@ -1,10 +1,15 @@ // 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 // We have to avoid ADL for this test. template <unsigned N> class test {}; -class foo {}; // expected-note {{candidate}} +class foo {}; // expected-note {{candidate constructor (the implicit copy constructor) not viable}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}} +#endif test<0> foo(foo); // expected-note {{candidate}} namespace Test0 { Modified: cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p2.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p2.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p2.cpp (original) +++ cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p2.cpp Tue Nov 17 14:25:05 2015 @@ -1,26 +1,58 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -Wno-c++0x-compat %s +// 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 // The auto or register specifiers can be applied only to names of objects // declared in a block (6.3) or to function parameters (8.4). auto int ao; // expected-error {{illegal storage class on file-scoped variable}} +#if __cplusplus >= 201103L // C++11 or later +// expected-warning@-2 {{'auto' storage class specifier is not permitted in C++11, and will not be supported in future releases}} +#endif + auto void af(); // expected-error {{illegal storage class on function}} +#if __cplusplus >= 201103L // C++11 or later +// expected-warning@-2 {{'auto' storage class specifier is not permitted in C++11, and will not be supported in future releases}} +#endif register int ro; // expected-error {{illegal storage class on file-scoped variable}} +#if __cplusplus >= 201103L // C++11 or later +// expected-warning@-2 {{'register' storage class specifier is deprecated}} +#endif + register void rf(); // expected-error {{illegal storage class on function}} struct S { auto int ao; // expected-error {{storage class specified for a member declaration}} +#if __cplusplus >= 201103L // C++11 or later +// expected-warning@-2 {{'auto' storage class specifier is not permitted in C++11, and will not be supported in future releases}} +#endif auto void af(); // expected-error {{storage class specified for a member declaration}} +#if __cplusplus >= 201103L // C++11 or later +// expected-warning@-2 {{'auto' storage class specifier is not permitted in C++11, and will not be supported in future releases}} +#endif register int ro; // expected-error {{storage class specified for a member declaration}} register void rf(); // expected-error {{storage class specified for a member declaration}} }; void foo(auto int ap, register int rp) { +#if __cplusplus >= 201103L // C++11 or later +// expected-warning@-2 {{'auto' storage class specifier is not permitted in C++11, and will not be supported in future releases}} +#endif auto int abo; +#if __cplusplus >= 201103L // C++11 or later +// expected-warning@-2 {{'auto' storage class specifier is not permitted in C++11, and will not be supported in future releases}} +#endif auto void abf(); // expected-error {{illegal storage class on function}} +#if __cplusplus >= 201103L // C++11 or later +// expected-warning@-2 {{'auto' storage class specifier is not permitted in C++11, and will not be supported in future releases}} +#endif register int rbo; +#if __cplusplus >= 201103L // C++11 or later +// expected-warning@-2 {{'register' storage class specifier is deprecated}} +#endif + register void rbf(); // expected-error {{illegal storage class on function}} } Modified: cfe/trunk/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp (original) +++ cfe/trunk/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp Tue Nov 17 14:25:05 2015 @@ -1,7 +1,12 @@ // 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 struct Base { }; struct Derived : Base { }; // expected-note{{candidate constructor (the implicit copy constructor) not viable}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}} +#endif struct Unrelated { }; struct Derived2 : Base { }; struct Diamond : Derived, Derived2 { }; Modified: cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp (original) +++ cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // 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 // Test instantiation of static data members declared out-of-line. @@ -15,6 +17,9 @@ struct InitOkay { }; struct CannotInit { }; // expected-note{{candidate constructor (the implicit copy constructor) not viable}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}} +#endif int &returnInt() { return X<int>::value; } float &returnFloat() { return X<float>::value; } Modified: cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp (original) +++ cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // 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 template<typename T> struct X0 { @@ -13,6 +15,9 @@ struct X1 { }; struct X2 { }; // expected-note{{candidate constructor (the implicit copy constructor) not viable}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}} +#endif int& get_int() { return X0<int>::value; } X1& get_X1() { return X0<X1>::value; } Modified: cfe/trunk/test/CXX/temp/temp.param/p3.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.param/p3.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/CXX/temp/temp.param/p3.cpp (original) +++ cfe/trunk/test/CXX/temp/temp.param/p3.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // 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 // A type-parameter defines its identifier to be a type-name (if // declared with class or typename) or template-name (if declared with @@ -16,6 +18,10 @@ template<template<class T> class Y> stru // type-parameter (because its identifier is the name of an already // existing class) is taken as a type-parameter. For example, class T { /* ... */ }; // expected-note{{candidate constructor (the implicit copy constructor) not viable}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}} +#endif + int i; template<class T, T i> struct X2 { Modified: cfe/trunk/test/CXX/temp/temp.spec/temp.explicit/p1.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.spec/temp.explicit/p1.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/CXX/temp/temp.spec/temp.explicit/p1.cpp (original) +++ cfe/trunk/test/CXX/temp/temp.spec/temp.explicit/p1.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // 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 struct C { }; @@ -49,6 +51,9 @@ template void X1<int>::f<>(int&, int*); // Explicitly instantiate members of a class template struct Incomplete; // expected-note{{forward declaration}} struct NonDefaultConstructible { // expected-note{{candidate constructor (the implicit copy constructor) not viable}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}} +#endif NonDefaultConstructible(int); // expected-note{{candidate constructor}} }; Modified: cfe/trunk/test/OpenMP/for_reduction_messages.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_reduction_messages.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/OpenMP/for_reduction_messages.cpp (original) +++ cfe/trunk/test/OpenMP/for_reduction_messages.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s void foo() { } @@ -54,6 +56,9 @@ public: S5(int v) : a(v) {} }; class S6 { // expected-note 2 {{candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const S6' for 1st argument}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 2 {{candidate function (the implicit move assignment operator) not viable: no known conversion from 'int' to 'S6' for 1st argument}} +#endif int a; public: Modified: cfe/trunk/test/OpenMP/for_simd_reduction_messages.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_reduction_messages.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/OpenMP/for_simd_reduction_messages.cpp (original) +++ cfe/trunk/test/OpenMP/for_simd_reduction_messages.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s void foo() { } @@ -55,6 +57,9 @@ public: S5(int v) : a(v) {} }; class S6 { // expected-note 2 {{candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const S6' for 1st argument}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 2 {{candidate function (the implicit move assignment operator) not viable}} +#endif int a; public: Modified: cfe/trunk/test/OpenMP/parallel_for_reduction_messages.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_reduction_messages.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/OpenMP/parallel_for_reduction_messages.cpp (original) +++ cfe/trunk/test/OpenMP/parallel_for_reduction_messages.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s void foo() { } @@ -55,6 +57,9 @@ public: S5(int v) : a(v) {} }; class S6 { // expected-note 2 {{candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const S6' for 1st argument}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 2 {{candidate function (the implicit move assignment operator) not viable}} +#endif int a; public: Modified: cfe/trunk/test/OpenMP/parallel_for_simd_reduction_messages.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_reduction_messages.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/OpenMP/parallel_for_simd_reduction_messages.cpp (original) +++ cfe/trunk/test/OpenMP/parallel_for_simd_reduction_messages.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -verify -fopenmp -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s void foo() { } @@ -55,6 +57,9 @@ public: S5(int v) : a(v) {} }; class S6 { // expected-note 2 {{candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const S6' for 1st argument}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 2 {{candidate function (the implicit move assignment operator) not viable}} +#endif int a; public: Modified: cfe/trunk/test/OpenMP/parallel_reduction_messages.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_reduction_messages.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/OpenMP/parallel_reduction_messages.cpp (original) +++ cfe/trunk/test/OpenMP/parallel_reduction_messages.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s void foo() { } @@ -55,6 +57,9 @@ public: S5(int v) : a(v) {} }; class S6 { // expected-note 2 {{candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const S6' for 1st argument}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 2 {{candidate function (the implicit move assignment operator) not viable}} +#endif int a; public: Modified: cfe/trunk/test/OpenMP/parallel_sections_reduction_messages.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_sections_reduction_messages.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/OpenMP/parallel_sections_reduction_messages.cpp (original) +++ cfe/trunk/test/OpenMP/parallel_sections_reduction_messages.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s void foo() { } @@ -55,6 +57,9 @@ public: S5(int v) : a(v) {} }; class S6 { // expected-note 2 {{candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const S6' for 1st argument}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 2 {{candidate function (the implicit move assignment operator) not viable}} +#endif int a; public: Modified: cfe/trunk/test/OpenMP/sections_reduction_messages.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/sections_reduction_messages.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/OpenMP/sections_reduction_messages.cpp (original) +++ cfe/trunk/test/OpenMP/sections_reduction_messages.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s void foo() { } @@ -55,6 +57,9 @@ public: S5(int v) : a(v) {} }; class S6 { // expected-note 2 {{candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const S6' for 1st argument}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 2 {{candidate function (the implicit move assignment operator) not viable}} +#endif int a; public: Modified: cfe/trunk/test/OpenMP/simd_reduction_messages.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_reduction_messages.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/OpenMP/simd_reduction_messages.cpp (original) +++ cfe/trunk/test/OpenMP/simd_reduction_messages.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s void foo() { } @@ -55,6 +57,9 @@ public: S5(int v) : a(v) {} }; class S6 { // expected-note 2 {{candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const S6' for 1st argument}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 2 {{candidate function (the implicit move assignment operator) not viable}} +#endif int a; public: Modified: cfe/trunk/test/OpenMP/teams_reduction_messages.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_reduction_messages.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/OpenMP/teams_reduction_messages.cpp (original) +++ cfe/trunk/test/OpenMP/teams_reduction_messages.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -verify -fopenmp -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s void foo() { } @@ -55,6 +57,9 @@ public: S5(int v) : a(v) {} }; class S6 { // expected-note 2 {{candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const S6' for 1st argument}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 2 {{candidate function (the implicit move assignment operator) not viable}} +#endif int a; public: Modified: cfe/trunk/test/SemaCXX/constructor-initializer.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/constructor-initializer.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/SemaCXX/constructor-initializer.cpp (original) +++ cfe/trunk/test/SemaCXX/constructor-initializer.cpp Tue Nov 17 14:25:05 2015 @@ -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}} Modified: cfe/trunk/test/SemaCXX/converting-constructor.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/converting-constructor.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/SemaCXX/converting-constructor.cpp (original) +++ cfe/trunk/test/SemaCXX/converting-constructor.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,7 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// 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 Z { }; class Y { @@ -28,6 +31,10 @@ public: }; class FromShortExplicitly { // expected-note{{candidate constructor (the implicit copy constructor)}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}} +#endif + public: explicit FromShortExplicitly(short s); }; Modified: cfe/trunk/test/SemaCXX/crashes.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/crashes.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/SemaCXX/crashes.cpp (original) +++ cfe/trunk/test/SemaCXX/crashes.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // 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 // <rdar://problem/8124080> template<typename _Alloc> class allocator; @@ -31,7 +33,11 @@ template<typename T> struct a : T { namespace rdar8605381 { struct X {}; -struct Y { // expected-note{{candidate}} +struct Y { // expected-note{{candidate constructor (the implicit copy constructor) not viable}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}} +#endif + Y(); }; Modified: cfe/trunk/test/SemaCXX/default1.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/default1.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/SemaCXX/default1.cpp (original) +++ cfe/trunk/test/SemaCXX/default1.cpp Tue Nov 17 14:25:05 2015 @@ -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 + void f(int i); void f(int i = 0); // expected-note {{previous definition is here}} void f(int i = 17); // expected-error {{redefinition of default argument}} @@ -23,7 +26,11 @@ struct X { void j(X x = 17); // expected-note{{'::j' declared here}} -struct Y { // expected-note 2{{candidate}} +struct Y { // expected-note 2{{candidate constructor (the implicit copy constructor) not viable}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 2 {{candidate constructor (the implicit move constructor) not viable}} +#endif + explicit Y(int); }; Modified: cfe/trunk/test/SemaCXX/direct-initializer.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/direct-initializer.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/SemaCXX/direct-initializer.cpp (original) +++ cfe/trunk/test/SemaCXX/direct-initializer.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// 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 int x(1); int (x2)(1); @@ -14,6 +16,10 @@ public: explicit Y(float); }; class X { // expected-note{{candidate constructor (the implicit copy constructor)}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}} +#endif + public: explicit X(int); // expected-note{{candidate constructor}} X(float, float, float); // expected-note{{candidate constructor}} @@ -21,6 +27,10 @@ public: }; class Z { // expected-note{{candidate constructor (the implicit copy constructor)}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}} +#endif + public: Z(int); // expected-note{{candidate constructor}} }; Modified: cfe/trunk/test/SemaCXX/expressions.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/expressions.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/SemaCXX/expressions.cpp (original) +++ cfe/trunk/test/SemaCXX/expressions.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -fsyntax-only -verify -Wno-constant-conversion %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-constant-conversion -std=c++98 %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-constant-conversion -std=c++11 %s void choice(int); int choice(bool); @@ -12,6 +14,9 @@ void test() { void f0() { extern void f0_1(int*); register int x; +#if __cplusplus >= 201103L // C++11 or later + // expected-warning@-2 {{'register' storage class specifier is deprecated}} +#endif f0_1(&x); } Modified: cfe/trunk/test/SemaCXX/namespace.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/namespace.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/SemaCXX/namespace.cpp (original) +++ cfe/trunk/test/SemaCXX/namespace.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,7 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// 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 + namespace A { // expected-note 2 {{previous definition is here}} int A; void f() { A = 0; } @@ -8,8 +11,11 @@ void f() { A = 0; } // expected-error {{ int A; // expected-error {{redefinition of 'A' as different kind of symbol}} class A; // expected-error {{redefinition of 'A' as different kind of symbol}} -class B {}; // expected-note {{previous definition is here}} \ - // expected-note{{candidate function (the implicit copy assignment operator)}} +class B {}; // expected-note {{previous definition is here}} +// expected-note@-1 {{candidate function (the implicit copy assignment operator) not viable}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-3 {{candidate function (the implicit move assignment operator) not viable}} +#endif void C(); // expected-note {{previous definition is here}} namespace C {} // expected-error {{redefinition of 'C' as different kind of symbol}} Modified: cfe/trunk/test/SemaCXX/overload-call-copycon.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/overload-call-copycon.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/SemaCXX/overload-call-copycon.cpp (original) +++ cfe/trunk/test/SemaCXX/overload-call-copycon.cpp Tue Nov 17 14:25:05 2015 @@ -1,6 +1,12 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -Wnon-pod-varargs -class X { }; // expected-note {{the implicit copy constructor}} \ - // expected-note{{the implicit default constructor}} +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s -Wnon-pod-varargs +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s -Wnon-pod-varargs + +class X { }; // expected-note {{the implicit copy constructor}} +// expected-note@-1 {{the implicit default constructor}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-3 {{candidate constructor (the implicit move constructor) not viable}} +#endif int& copycon(X x); // expected-note{{passing argument to parameter}} float& copycon(...); Modified: cfe/trunk/test/SemaCXX/overloaded-builtin-operators.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/overloaded-builtin-operators.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/SemaCXX/overloaded-builtin-operators.cpp (original) +++ cfe/trunk/test/SemaCXX/overloaded-builtin-operators.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -fsyntax-only -fshow-overloads=best -verify -triple x86_64-linux-gnu %s +// RUN: %clang_cc1 -fsyntax-only -fshow-overloads=best -verify -triple x86_64-linux-gnu -std=c++98 %s +// RUN: %clang_cc1 -fsyntax-only -fshow-overloads=best -verify -triple x86_64-linux-gnu -std=c++11 %s struct yes; struct no; @@ -60,7 +62,10 @@ void f(Short s, Long l, Enum1 e1, Enum2 // FIXME: should pass (void)static_cast<no&>(islong(e1 % e2)); } -struct ShortRef { // expected-note{{candidate function (the implicit copy assignment operator)}} +struct ShortRef { // expected-note{{candidate function (the implicit copy assignment operator) not viable}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 {{candidate function (the implicit move assignment operator) not viable}} +#endif operator short&(); }; @@ -68,7 +73,10 @@ struct LongRef { operator volatile long&(); }; -struct XpmfRef { // expected-note{{candidate function (the implicit copy assignment operator)}} +struct XpmfRef { // expected-note{{candidate function (the implicit copy assignment operator) not viable}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 {{candidate function (the implicit move assignment operator) not viable}} +#endif operator pmf&(); }; Modified: cfe/trunk/test/SemaCXX/vector.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/vector.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/SemaCXX/vector.cpp (original) +++ cfe/trunk/test/SemaCXX/vector.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,7 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -std=c++98 %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -std=c++11 %s + typedef char char16 __attribute__ ((__vector_size__ (16))); typedef long long longlong16 __attribute__ ((__vector_size__ (16))); typedef char char16_e __attribute__ ((__ext_vector_type__ (16))); @@ -101,7 +104,10 @@ void casts(longlong16 ll16, longlong16_e } template<typename T> -struct convertible_to { // expected-note 3 {{candidate function (the implicit copy assignment operator)}} +struct convertible_to { // expected-note 3 {{candidate function (the implicit copy assignment operator) not viable}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 3 {{candidate function (the implicit move assignment operator) not viable}} +#endif operator T() const; }; Modified: cfe/trunk/test/SemaTemplate/class-template-ctor-initializer.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/class-template-ctor-initializer.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/SemaTemplate/class-template-ctor-initializer.cpp (original) +++ cfe/trunk/test/SemaTemplate/class-template-ctor-initializer.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // 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 template<class X> struct A {}; @@ -55,7 +57,11 @@ namespace PR7259 { } namespace NonDependentError { - struct Base { Base(int); }; // expected-note 2{{candidate}} + struct Base { Base(int); }; // expected-note {{candidate constructor not viable}} +// 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 template<typename T> struct Derived1 : Base { Modified: cfe/trunk/test/SemaTemplate/constructor-template.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/constructor-template.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/SemaTemplate/constructor-template.cpp (original) +++ cfe/trunk/test/SemaTemplate/constructor-template.cpp Tue Nov 17 14:25:05 2015 @@ -1,5 +1,11 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -struct X0 { // expected-note{{candidate}} +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s + +struct X0 { // expected-note {{candidate constructor (the implicit copy constructor) not viable}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}} +#endif X0(int); // expected-note{{candidate}} template<typename T> X0(T); // expected-note {{candidate}} template<typename T, typename U> X0(T*, U*); // expected-note {{candidate}} Modified: cfe/trunk/test/SemaTemplate/default-expr-arguments.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/default-expr-arguments.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/SemaTemplate/default-expr-arguments.cpp (original) +++ cfe/trunk/test/SemaTemplate/default-expr-arguments.cpp Tue Nov 17 14:25:05 2015 @@ -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 + template<typename T> class C { C(int a0 = 0); }; @@ -6,6 +9,9 @@ template<> C<char>::C(int a0); struct S { }; // expected-note 3 {{candidate constructor (the implicit copy constructor)}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 3 {{candidate constructor (the implicit move constructor) not viable}} +#endif template<typename T> void f1(T a, T b = 10) { } // expected-error{{no viable conversion}} \ // expected-note{{passing argument to parameter 'b' here}} @@ -67,7 +73,10 @@ void test_x0(X0<int> xi) { xi.f(17); } -struct NotDefaultConstructible { // expected-note 2{{candidate}} +struct NotDefaultConstructible { // expected-note 2 {{candidate constructor (the implicit copy constructor) not viable}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 2 {{candidate constructor (the implicit move constructor) not viable}} +#endif NotDefaultConstructible(int); // expected-note 2{{candidate}} }; Modified: cfe/trunk/test/SemaTemplate/fun-template-def.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/fun-template-def.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/SemaTemplate/fun-template-def.cpp (original) +++ cfe/trunk/test/SemaTemplate/fun-template-def.cpp Tue Nov 17 14:25:05 2015 @@ -1,4 +1,6 @@ // 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 // Tests that dependent expressions are always allowed, whereas non-dependent // are checked as usual. @@ -9,6 +11,9 @@ namespace std { class type_info {}; } struct dummy {}; // expected-note 3 {{candidate constructor (the implicit copy constructor)}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 3 {{candidate constructor (the implicit move constructor) not viable}} +#endif template<typename T> int f0(T x) { Modified: cfe/trunk/test/SemaTemplate/qualified-names-diag.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/qualified-names-diag.cpp?rev=253371&r1=253370&r2=253371&view=diff ============================================================================== --- cfe/trunk/test/SemaTemplate/qualified-names-diag.cpp (original) +++ cfe/trunk/test/SemaTemplate/qualified-names-diag.cpp Tue Nov 17 14:25:05 2015 @@ -1,7 +1,12 @@ // 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 namespace std { - template<typename T> class vector { }; // expected-note{{candidate}} + template<typename T> class vector { }; // expected-note{{candidate function (the implicit copy assignment operator) not viable}} +#if __cplusplus >= 201103L // C++11 or later + // expected-note@-2 {{candidate function (the implicit move assignment operator) not viable}} +#endif } typedef int INT; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits