diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-11-18 14:59:57 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-11-18 14:59:57 +0000 |
commit | 741c13ecc20fb35b836ad690aeecd402f002d654 (patch) | |
tree | 60a1694bec5a44d15456acc880cb2f91619f66aa /test/SemaCXX/default-constructor-initializers.cpp | |
parent | b3a51061b1b9c4add078237850649f7c9efb13ab (diff) | |
download | FreeBSD-src-741c13ecc20fb35b836ad690aeecd402f002d654.zip FreeBSD-src-741c13ecc20fb35b836ad690aeecd402f002d654.tar.gz |
Update clang to r89205.
Diffstat (limited to 'test/SemaCXX/default-constructor-initializers.cpp')
-rw-r--r-- | test/SemaCXX/default-constructor-initializers.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/SemaCXX/default-constructor-initializers.cpp b/test/SemaCXX/default-constructor-initializers.cpp index 6cbb978..6adcdca 100644 --- a/test/SemaCXX/default-constructor-initializers.cpp +++ b/test/SemaCXX/default-constructor-initializers.cpp @@ -9,18 +9,18 @@ struct X2 : X1 { // expected-note {{'struct X2' declared here}} \ X2(int); }; -struct X3 : public X2 { +struct X3 : public X2 { // expected-error {{must explicitly initialize the base class 'struct X2'}} }; -X3 x3; // expected-error {{cannot define the implicit default constructor for 'struct X3', because base class 'struct X2' does not have any default constructor}} +X3 x3; // expected-note {{first required here}} -struct X4 { +struct X4 { // expected-error {{must explicitly initialize the member 'x2'}} \ + // expected-error {{must explicitly initialize the reference member 'rx2'}} X2 x2; // expected-note {{member is declared here}} X2 & rx2; // expected-note {{declared at}} }; -X4 x4; // expected-error {{cannot define the implicit default constructor for 'struct X4', because member's type 'struct X2' does not have any default constructor}} \ - // expected-error {{cannot define the implicit default constructor for 'struct X4', because reference member 'rx2' cannot be default-initialized}} +X4 x4; // expected-note {{first required here}} struct Y1 { // has no implicit default constructor @@ -45,12 +45,12 @@ Y4 y4; // More tests -struct Z1 { +struct Z1 { // expected-error {{must explicitly initialize the reference member 'z'}} \ + // expected-error {{must explicitly initialize the const member 'c1'}} int& z; // expected-note {{declared at}} const int c1; // expected-note {{declared at}} volatile int v1; }; -Z1 z1; // expected-error {{cannot define the implicit default constructor for 'struct Z1', because reference member 'z' cannot be default-initialized}} \ - // expected-error {{cannot define the implicit default constructor for 'struct Z1', because const member 'c1' cannot be default-initialized}} +Z1 z1; // expected-note {{first required here}} |