diff options
Diffstat (limited to 'test/CXX')
-rw-r--r-- | test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp | 4 | ||||
-rw-r--r-- | test/CXX/class.access/class.friend/p1.cpp | 18 | ||||
-rw-r--r-- | test/CXX/class/class.friend/p1.cpp | 2 | ||||
-rw-r--r-- | test/CXX/class/class.local/p2.cpp | 2 | ||||
-rw-r--r-- | test/CXX/class/class.union/p1.cpp | 42 | ||||
-rw-r--r-- | test/CXX/conv/conv.mem/p4.cpp | 16 | ||||
-rw-r--r-- | test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp | 4 | ||||
-rw-r--r-- | test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp | 10 | ||||
-rw-r--r-- | test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp | 28 | ||||
-rw-r--r-- | test/CXX/dcl.decl/dcl.init/p6.cpp | 5 | ||||
-rw-r--r-- | test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp | 4 |
11 files changed, 68 insertions, 67 deletions
diff --git a/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp b/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp index 7a62100..f9bac40 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp @@ -57,9 +57,9 @@ void test3() { int i = Ints::zero; Numbers2::f(i); - Numbers2::g(i); // expected-error {{no viable conversion from 'int' to 'struct Numbers::Number' is possible}} + Numbers2::g(i); // expected-error {{no viable conversion from 'int' to 'Numbers::Number'}} float f = Floats::zero; Numbers2::f(f); - Numbers2::g(f); // expected-error {{no viable conversion from 'float' to 'struct Numbers::Number' is possible}} + Numbers2::g(f); // expected-error {{no viable conversion from 'float' to 'Numbers::Number'}} } diff --git a/test/CXX/class.access/class.friend/p1.cpp b/test/CXX/class.access/class.friend/p1.cpp index 22f77b0..a06fb2e 100644 --- a/test/CXX/class.access/class.friend/p1.cpp +++ b/test/CXX/class.access/class.friend/p1.cpp @@ -22,10 +22,10 @@ void test1() { S s; g()->f(); S::f(); - X::g(); // expected-error{{no member named 'g' in 'struct X'}} - X::S x_s; // expected-error{{no member named 'S' in 'struct X'}} + X::g(); // expected-error{{no member named 'g' in 'X'}} + X::S x_s; // expected-error{{no member named 'S' in 'X'}} X x; - x.g(); // expected-error{{no member named 'g' in 'struct X'}} + x.g(); // expected-error{{no member named 'g' in 'X'}} } // Test that we recurse through namespaces to find already declared names, but @@ -46,17 +46,17 @@ namespace N { g()->f(); S s; S::f(); - X::g(); // expected-error{{no member named 'g' in 'struct N::X'}} - X::S x_s; // expected-error{{no member named 'S' in 'struct N::X'}} + X::g(); // expected-error{{no member named 'g' in 'N::X'}} + X::S x_s; // expected-error{{no member named 'S' in 'N::X'}} X x; - x.g(); // expected-error{{no member named 'g' in 'struct N::X'}} + x.g(); // expected-error{{no member named 'g' in 'N::X'}} g2(); S2 s2; ::g2(); // expected-error{{no member named 'g2' in the global namespace}} ::S2 g_s2; // expected-error{{no member named 'S2' in the global namespace}} - X::g2(); // expected-error{{no member named 'g2' in 'struct N::X'}} - X::S2 x_s2; // expected-error{{no member named 'S2' in 'struct N::X'}} - x.g2(); // expected-error{{no member named 'g2' in 'struct N::X'}} + X::g2(); // expected-error{{no member named 'g2' in 'N::X'}} + X::S2 x_s2; // expected-error{{no member named 'S2' in 'N::X'}} + x.g2(); // expected-error{{no member named 'g2' in 'N::X'}} } } diff --git a/test/CXX/class/class.friend/p1.cpp b/test/CXX/class/class.friend/p1.cpp index 886fef5..3ad4a5f 100644 --- a/test/CXX/class/class.friend/p1.cpp +++ b/test/CXX/class/class.friend/p1.cpp @@ -67,7 +67,7 @@ class A { class facet {}; }; -A::UndeclaredSoFar y; // expected-error {{no type named 'UndeclaredSoFar' in 'class A'}} +A::UndeclaredSoFar y; // expected-error {{no type named 'UndeclaredSoFar' in 'A'}} class PreDeclared; diff --git a/test/CXX/class/class.local/p2.cpp b/test/CXX/class/class.local/p2.cpp index 8d281a5..2b1359c 100644 --- a/test/CXX/class/class.local/p2.cpp +++ b/test/CXX/class/class.local/p2.cpp @@ -7,5 +7,5 @@ void f() { B b; - A *a = &b; // expected-error{{cannot cast 'struct B' to its private base class 'struct A'}} + A *a = &b; // expected-error{{cannot cast 'B' to its private base class 'A'}} } diff --git a/test/CXX/class/class.union/p1.cpp b/test/CXX/class/class.union/p1.cpp index 8794648..f53783e 100644 --- a/test/CXX/class/class.union/p1.cpp +++ b/test/CXX/class/class.union/p1.cpp @@ -7,30 +7,30 @@ class Okay { }; class Virtual { - virtual void foo() { abort(); } // expected-note 3 {{because type 'class Virtual' has a virtual member function}} + virtual void foo() { abort(); } // expected-note 3 {{because type 'Virtual' has a virtual member function}} }; -class VirtualBase : virtual Okay { // expected-note 3 {{because type 'class VirtualBase' has a virtual base class}} +class VirtualBase : virtual Okay { // expected-note 3 {{because type 'VirtualBase' has a virtual base class}} }; class Ctor { - Ctor() { abort(); } // expected-note 3 {{because type 'class Ctor' has a user-declared constructor}} + Ctor() { abort(); } // expected-note 3 {{because type 'Ctor' has a user-declared constructor}} }; class Ctor2 { - Ctor2(); // expected-note 3 {{because type 'class Ctor2' has a user-declared constructor}} + Ctor2(); // expected-note 3 {{because type 'Ctor2' has a user-declared constructor}} }; class CopyCtor { - CopyCtor(CopyCtor &cc) { abort(); } // expected-note 3 {{because type 'class CopyCtor' has a user-declared copy constructor}} + CopyCtor(CopyCtor &cc) { abort(); } // expected-note 3 {{because type 'CopyCtor' has a user-declared copy constructor}} }; // FIXME: this should eventually trigger on the operator's declaration line -class CopyAssign { // expected-note 3 {{because type 'class CopyAssign' has a user-declared copy assignment operator}} +class CopyAssign { // expected-note 3 {{because type 'CopyAssign' has a user-declared copy assignment operator}} CopyAssign& operator=(CopyAssign& CA) { abort(); } }; class Dtor { - ~Dtor() { abort(); } // expected-note 3 {{because type 'class Dtor' has a user-declared destructor}} + ~Dtor() { abort(); } // expected-note 3 {{because type 'Dtor' has a user-declared destructor}} }; union U1 { @@ -46,25 +46,25 @@ union U1 { union U2 { struct { - Virtual v; // expected-note {{because type 'struct U2::<anonymous>' has a member with a non-trivial copy constructor}} + Virtual v; // expected-note {{because type 'U2::<anonymous>' has a member with a non-trivial copy constructor}} } m1; // expected-error {{union member 'm1' has a non-trivial copy constructor}} struct { - VirtualBase vbase; // expected-note {{because type 'struct U2::<anonymous>' has a member with a non-trivial copy constructor}} + VirtualBase vbase; // expected-note {{because type 'U2::<anonymous>' has a member with a non-trivial copy constructor}} } m2; // expected-error {{union member 'm2' has a non-trivial copy constructor}} struct { - Ctor ctor; // expected-note {{because type 'struct U2::<anonymous>' has a member with a non-trivial constructor}} + Ctor ctor; // expected-note {{because type 'U2::<anonymous>' has a member with a non-trivial constructor}} } m3; // expected-error {{union member 'm3' has a non-trivial constructor}} struct { - Ctor2 ctor2; // expected-note {{because type 'struct U2::<anonymous>' has a member with a non-trivial constructor}} + Ctor2 ctor2; // expected-note {{because type 'U2::<anonymous>' has a member with a non-trivial constructor}} } m3a; // expected-error {{union member 'm3a' has a non-trivial constructor}} struct { - CopyCtor copyctor; // expected-note {{because type 'struct U2::<anonymous>' has a member with a non-trivial copy constructor}} + CopyCtor copyctor; // expected-note {{because type 'U2::<anonymous>' has a member with a non-trivial copy constructor}} } m4; // expected-error {{union member 'm4' has a non-trivial copy constructor}} struct { - CopyAssign copyassign; // expected-note {{because type 'struct U2::<anonymous>' has a member with a non-trivial copy assignment operator}} + CopyAssign copyassign; // expected-note {{because type 'U2::<anonymous>' has a member with a non-trivial copy assignment operator}} } m5; // expected-error {{union member 'm5' has a non-trivial copy assignment operator}} struct { - Dtor dtor; // expected-note {{because type 'struct U2::<anonymous>' has a member with a non-trivial destructor}} + Dtor dtor; // expected-note {{because type 'U2::<anonymous>' has a member with a non-trivial destructor}} } m6; // expected-error {{union member 'm6' has a non-trivial destructor}} struct { Okay okay; @@ -72,19 +72,19 @@ union U2 { }; union U3 { - struct s1 : Virtual { // expected-note {{because type 'struct U3::s1' has a base class with a non-trivial copy constructor}} + struct s1 : Virtual { // expected-note {{because type 'U3::s1' has a base class with a non-trivial copy constructor}} } m1; // expected-error {{union member 'm1' has a non-trivial copy constructor}} - struct s2 : VirtualBase { // expected-note {{because type 'struct U3::s2' has a base class with a non-trivial copy constructor}} + struct s2 : VirtualBase { // expected-note {{because type 'U3::s2' has a base class with a non-trivial copy constructor}} } m2; // expected-error {{union member 'm2' has a non-trivial copy constructor}} - struct s3 : Ctor { // expected-note {{because type 'struct U3::s3' has a base class with a non-trivial constructor}} + struct s3 : Ctor { // expected-note {{because type 'U3::s3' has a base class with a non-trivial constructor}} } m3; // expected-error {{union member 'm3' has a non-trivial constructor}} - struct s3a : Ctor2 { // expected-note {{because type 'struct U3::s3a' has a base class with a non-trivial constructor}} + struct s3a : Ctor2 { // expected-note {{because type 'U3::s3a' has a base class with a non-trivial constructor}} } m3a; // expected-error {{union member 'm3a' has a non-trivial constructor}} - struct s4 : CopyCtor { // expected-note {{because type 'struct U3::s4' has a base class with a non-trivial copy constructor}} + struct s4 : CopyCtor { // expected-note {{because type 'U3::s4' has a base class with a non-trivial copy constructor}} } m4; // expected-error {{union member 'm4' has a non-trivial copy constructor}} - struct s5 : CopyAssign { // expected-note {{because type 'struct U3::s5' has a base class with a non-trivial copy assignment operator}} + struct s5 : CopyAssign { // expected-note {{because type 'U3::s5' has a base class with a non-trivial copy assignment operator}} } m5; // expected-error {{union member 'm5' has a non-trivial copy assignment operator}} - struct s6 : Dtor { // expected-note {{because type 'struct U3::s6' has a base class with a non-trivial destructor}} + struct s6 : Dtor { // expected-note {{because type 'U3::s6' has a base class with a non-trivial destructor}} } m6; // expected-error {{union member 'm6' has a non-trivial destructor}} struct s7 : Okay { } m7; diff --git a/test/CXX/conv/conv.mem/p4.cpp b/test/CXX/conv/conv.mem/p4.cpp index 1ecbc47..42f6343 100644 --- a/test/CXX/conv/conv.mem/p4.cpp +++ b/test/CXX/conv/conv.mem/p4.cpp @@ -19,8 +19,8 @@ namespace test0 { namespace test1 { struct Derived : private Base {}; // expected-note 2 {{declared private here}} void test() { - int (Derived::*d) = data_ptr; // expected-error {{cannot cast private base class 'struct Base' to 'struct test1::Derived'}} - int (Derived::*m)() = method_ptr; // expected-error {{cannot cast private base class 'struct Base' to 'struct test1::Derived'}} + int (Derived::*d) = data_ptr; // expected-error {{cannot cast private base class 'Base' to 'test1::Derived'}} + int (Derived::*m)() = method_ptr; // expected-error {{cannot cast private base class 'Base' to 'test1::Derived'}} } }; @@ -30,8 +30,8 @@ namespace test2 { struct B : Base {}; struct Derived : A, B {}; void test() { - int (Derived::*d) = data_ptr; // expected-error {{ambiguous conversion from pointer to member of base class 'struct Base' to pointer to member of derived class 'struct test2::Derived'}} - int (Derived::*m)() = method_ptr; // expected-error {{ambiguous conversion from pointer to member of base class 'struct Base' to pointer to member of derived class 'struct test2::Derived'}} + int (Derived::*d) = data_ptr; // expected-error {{ambiguous conversion from pointer to member of base class 'Base' to pointer to member of derived class 'test2::Derived':}} + int (Derived::*m)() = method_ptr; // expected-error {{ambiguous conversion from pointer to member of base class 'Base' to pointer to member of derived class 'test2::Derived':}} } } @@ -39,8 +39,8 @@ namespace test2 { namespace test3 { struct Derived : virtual Base {}; void test() { - int (Derived::*d) = data_ptr; // expected-error {{conversion from pointer to member of class 'struct Base' to pointer to member of class 'struct test3::Derived' via virtual base 'struct Base' is not allowed}} - int (Derived::*m)() = method_ptr; // expected-error {{conversion from pointer to member of class 'struct Base' to pointer to member of class 'struct test3::Derived' via virtual base 'struct Base' is not allowed}} + int (Derived::*d) = data_ptr; // expected-error {{conversion from pointer to member of class 'Base' to pointer to member of class 'test3::Derived' via virtual base 'Base' is not allowed}} + int (Derived::*m)() = method_ptr; // expected-error {{conversion from pointer to member of class 'Base' to pointer to member of class 'test3::Derived' via virtual base 'Base' is not allowed}} } } @@ -49,8 +49,8 @@ namespace test4 { struct A : Base {}; struct Derived : Base, virtual A {}; void test() { - int (Derived::*d) = data_ptr; // expected-error {{ambiguous conversion from pointer to member of base class 'struct Base' to pointer to member of derived class 'struct test4::Derived'}} - int (Derived::*m)() = method_ptr; // expected-error {{ambiguous conversion from pointer to member of base class 'struct Base' to pointer to member of derived class 'struct test4::Derived'}} + int (Derived::*d) = data_ptr; // expected-error {{ambiguous conversion from pointer to member of base class 'Base' to pointer to member of derived class 'test4::Derived':}} + int (Derived::*m)() = method_ptr; // expected-error {{ambiguous conversion from pointer to member of base class 'Base' to pointer to member of derived class 'test4::Derived':}} } } diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp index 7bfb655..f507eec 100644 --- a/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp +++ b/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -verify %s -struct S; // expected-note {{forward declaration of 'struct S'}} +struct S; // expected-note {{forward declaration of 'S'}} extern S a; extern S f(); // expected-note {{'f' declared here}} extern void g(S a); // expected-note {{candidate function}} @@ -8,5 +8,5 @@ extern void g(S a); // expected-note {{candidate function}} void h() { // FIXME: This diagnostic could be better. g(a); // expected-error {{no matching function for call to 'g'}} - f(); // expected-error {{calling 'f' with incomplete return type 'struct S'}} + f(); // expected-error {{calling 'f' with incomplete return type 'S'}} } diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp index 7c63a79..d757adf 100644 --- a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp +++ b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp @@ -16,10 +16,10 @@ struct B : A { } b; // CHECK: example1 void example1() { - // CHECK: struct A &ra = + // CHECK: A &ra = // CHECK: ImplicitCastExpr{{.*}}'struct A' <DerivedToBase> lvalue A &ra = b; - // CHECK: struct A const &rca = + // CHECK: A const &rca = // CHECK: ImplicitCastExpr{{.*}}'struct A const' <NoOp> // CHECK: ImplicitCastExpr{{.*}}'struct A' <DerivedToBase> const A& rca = b; @@ -33,12 +33,12 @@ struct X { // CHECK: example2 void example2() { - // CHECK: struct A const &rca = + // CHECK: A const &rca = // CHECK: ImplicitCastExpr{{.*}}'struct A const' <NoOp> // CHECK: ImplicitCastExpr{{.*}}'struct A' <DerivedToBase> - // CHECK: CallExpr{{.*}}struct B + // CHECK: CallExpr{{.*}}B const A &rca = f(); - // CHECK: struct A const &r = + // CHECK: A const &r = // CHECK: ImplicitCastExpr{{.*}}'struct A const' <NoOp> // CHECK: ImplicitCastExpr{{.*}}'struct A' <DerivedToBase> // CHECK: CXXMemberCallExpr{{.*}}'struct B' diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp index d9c5d01..6a039b9 100644 --- a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp +++ b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp @@ -51,10 +51,10 @@ void bind_lvalue_to_lvalue(Base b, Derived d, Base &br1 = b; Base &br2 = d; Derived &dr1 = d; - Derived &dr2 = b; // expected-error{{non-const lvalue reference to type 'struct Derived' cannot bind to a value of unrelated type 'struct Base'}} + Derived &dr2 = b; // expected-error{{non-const lvalue reference to type 'Derived' cannot bind to a value of unrelated type 'Base'}} Base &br3 = bc; // expected-error{{drops qualifiers}} Base &br4 = dc; // expected-error{{drops qualifiers}} - Base &br5 = diamond; // expected-error{{ambiguous conversion from derived class 'struct Diamond' to base class 'struct Base'}} + Base &br5 = diamond; // expected-error{{ambiguous conversion from derived class 'Diamond' to base class 'Base':}} int &ir = i; long &lr = i; // expected-error{{non-const lvalue reference to type 'long' cannot bind to a value of unrelated type 'int'}} } @@ -64,8 +64,8 @@ void bind_lvalue_quals(volatile Base b, volatile Derived d, volatile const int ivc) { volatile Base &bvr1 = b; volatile Base &bvr2 = d; - volatile Base &bvr3 = bvc; // expected-error{{binding of reference to type 'struct Base volatile' to a value of type 'struct Base const volatile' drops qualifiers}} - volatile Base &bvr4 = dvc; // expected-error{{binding of reference to type 'struct Base volatile' to a value of type 'struct Derived const volatile' drops qualifiers}} + volatile Base &bvr3 = bvc; // expected-error{{binding of reference to type 'Base volatile' to a value of type 'Base const volatile' drops qualifiers}} + volatile Base &bvr4 = dvc; // expected-error{{binding of reference to type 'Base volatile' to a value of type 'Derived const volatile' drops qualifiers}} volatile int &ir = ivc; // expected-error{{binding of reference to type 'int volatile' to a value of type 'int const volatile' drops qualifiers}} @@ -74,17 +74,17 @@ void bind_lvalue_quals(volatile Base b, volatile Derived d, } void bind_lvalue_to_rvalue() { - Base &br1 = Base(); // expected-error{{non-const lvalue reference to type 'struct Base' cannot bind to a temporary of type 'struct Base'}} - Base &br2 = Derived(); // expected-error{{non-const lvalue reference to type 'struct Base' cannot bind to a temporary of type 'struct Derived'}} - const volatile Base &br3 = Base(); // expected-error{{volatile lvalue reference to type 'struct Base const volatile' cannot bind to a temporary of type 'struct Base'}} - const volatile Base &br4 = Derived(); // expected-error{{volatile lvalue reference to type 'struct Base const volatile' cannot bind to a temporary of type 'struct Derived'}} + Base &br1 = Base(); // expected-error{{non-const lvalue reference to type 'Base' cannot bind to a temporary of type 'Base'}} + Base &br2 = Derived(); // expected-error{{non-const lvalue reference to type 'Base' cannot bind to a temporary of type 'Derived'}} + const volatile Base &br3 = Base(); // expected-error{{volatile lvalue reference to type 'Base const volatile' cannot bind to a temporary of type 'Base'}} + const volatile Base &br4 = Derived(); // expected-error{{volatile lvalue reference to type 'Base const volatile' cannot bind to a temporary of type 'Derived'}} int &ir = 17; // expected-error{{non-const lvalue reference to type 'int' cannot bind to a temporary of type 'int'}} } void bind_lvalue_to_unrelated(Unrelated ur) { - Base &br1 = ur; // expected-error{{non-const lvalue reference to type 'struct Base' cannot bind to a value of unrelated type 'struct Unrelated'}} - const volatile Base &br2 = ur; // expected-error{{volatile lvalue reference to type 'struct Base const volatile' cannot bind to a value of unrelated type 'struct Unrelated'}} + Base &br1 = ur; // expected-error{{non-const lvalue reference to type 'Base' cannot bind to a value of unrelated type 'Unrelated'}} + const volatile Base &br2 = ur; // expected-error{{volatile lvalue reference to type 'Base const volatile' cannot bind to a value of unrelated type 'Unrelated'}} } void bind_lvalue_to_conv_lvalue() { @@ -97,7 +97,7 @@ void bind_lvalue_to_conv_lvalue() { void bind_lvalue_to_conv_lvalue_ambig(ConvertibleToBothDerivedRef both) { Derived &dr1 = both; - Base &br1 = both; // expected-error{{reference initialization of type 'struct Base &' with initializer of type 'struct ConvertibleToBothDerivedRef' is ambiguous}} + Base &br1 = both; // expected-error{{reference initialization of type 'Base &' with initializer of type 'ConvertibleToBothDerivedRef' is ambiguous}} } struct IntBitfield { @@ -118,8 +118,8 @@ void bind_const_lvalue_to_rvalue() { const Base &br3 = create<const Base>(); const Base &br4 = create<const Derived>(); - const Base &br5 = create<const volatile Base>(); // expected-error{{binding of reference to type 'struct Base const' to a value of type 'struct Base const volatile' drops qualifiers}} - const Base &br6 = create<const volatile Derived>(); // expected-error{{binding of reference to type 'struct Base const' to a value of type 'struct Derived const volatile' drops qualifiers}} + const Base &br5 = create<const volatile Base>(); // expected-error{{binding of reference to type 'Base const' to a value of type 'Base const volatile' drops qualifiers}} + const Base &br6 = create<const volatile Derived>(); // expected-error{{binding of reference to type 'Base const' to a value of type 'Derived const volatile' drops qualifiers}} const int &ir = create<int>(); } @@ -131,5 +131,5 @@ void bind_const_lvalue_to_class_conv_temporary() { } void bind_lvalue_to_conv_rvalue_ambig(ConvertibleToBothDerived both) { const Derived &dr1 = both; - const Base &br1 = both; // expected-error{{reference initialization of type 'struct Base const &' with initializer of type 'struct ConvertibleToBothDerived' is ambiguous}} + const Base &br1 = both; // expected-error{{reference initialization of type 'Base const &' with initializer of type 'ConvertibleToBothDerived' is ambiguous}} } diff --git a/test/CXX/dcl.decl/dcl.init/p6.cpp b/test/CXX/dcl.decl/dcl.init/p6.cpp index f627a19..c542dac 100644 --- a/test/CXX/dcl.decl/dcl.init/p6.cpp +++ b/test/CXX/dcl.decl/dcl.init/p6.cpp @@ -5,11 +5,12 @@ // If a program calls for the default initialization of an object of a // const-qualified type T, T shall be a class type with a // user-provided default constructor. -struct NoUserDefault { }; +struct MakeNonPOD { MakeNonPOD(); }; +struct NoUserDefault : public MakeNonPOD { }; struct HasUserDefault { HasUserDefault(); }; void test_const_default_init() { - const NoUserDefault x1; // expected-error{{default initialization of an object of const type 'struct NoUserDefault const' requires a user-provided default constructor}} + const NoUserDefault x1; // expected-error{{default initialization of an object of const type 'NoUserDefault const' requires a user-provided default constructor}} const HasUserDefault x2; const int x3; // expected-error{{default initialization of an object of const type 'int const'}} } diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp index 561e26b..7e35788 100644 --- a/test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp +++ b/test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp @@ -16,11 +16,11 @@ void f() { int b; A a(b); - int A::*ip = &A::s; // expected-error {{cannot initialize a variable of type 'int class A::*' with an rvalue of type 'int *'}} + int A::*ip = &A::s; // expected-error {{cannot initialize a variable of type 'int A::*' with an rvalue of type 'int *'}} a.*&A::s = 10; // expected-error{{right hand operand to .* has non pointer-to-member type 'int *'}} a.*&A::i = 10; // expected-error{{cannot form a pointer-to-member to member 'i' of reference type 'int &'}} - ft(a); // expected-note{{in instantiation of function template specialization 'ft<class A>' requested here}} + ft(a); // expected-note{{in instantiation of function template specialization 'ft<A>' requested here}} void A::*p = 0; // expected-error{{'p' declared as a member pointer to void}} } |