diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-06-03 07:28:54 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-06-03 07:28:54 +0000 |
commit | 6c3bbf42712e4b10d6f43edaee685a6abd45ed68 (patch) | |
tree | f748aef5f60071b2e9a46cda20171097b2bb0e22 /clang/test/SemaCXX/dcl_init_aggr.cpp | |
parent | 076caf789760adb5a2d1028ad8357ce0e899ee87 (diff) | |
download | bcm5719-llvm-6c3bbf42712e4b10d6f43edaee685a6abd45ed68.tar.gz bcm5719-llvm-6c3bbf42712e4b10d6f43edaee685a6abd45ed68.zip |
PR11410: Extend diagnostic to cover all cases of aggregate initialization, not
just the extremely specific case of a trailing array element that couldn't be
initialized because the default constructor for the element type is deleted.
Also reword the diagnostic to better match our other context diagnostics and to
prepare for the implementation of core issue 1070.
llvm-svn: 210083
Diffstat (limited to 'clang/test/SemaCXX/dcl_init_aggr.cpp')
-rw-r--r-- | clang/test/SemaCXX/dcl_init_aggr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/dcl_init_aggr.cpp b/clang/test/SemaCXX/dcl_init_aggr.cpp index 8c5e654fca2..432c1164661 100644 --- a/clang/test/SemaCXX/dcl_init_aggr.cpp +++ b/clang/test/SemaCXX/dcl_init_aggr.cpp @@ -46,7 +46,7 @@ struct NoDefaultConstructor { // expected-note 3 {{candidate constructor (the im }; struct TooFewError { // expected-error{{implicit default constructor for}} int a; - NoDefaultConstructor nodef; // expected-note{{member is declared here}} + NoDefaultConstructor nodef; // expected-note{{member is declared here}} expected-note 2{{in implicit initialization of field 'nodef'}} }; TooFewError too_few_okay = { 1, 1 }; TooFewError too_few_error = { 1 }; // expected-error{{no matching constructor}} @@ -54,7 +54,7 @@ TooFewError too_few_error = { 1 }; // expected-error{{no matching constructor}} TooFewError too_few_okay2[2] = { 1, 1 }; // expected-note{{implicit default constructor for 'TooFewError' first required here}} TooFewError too_few_error2[2] = { 1 }; // expected-error{{no matching constructor}} -NoDefaultConstructor too_few_error3[3] = { }; // expected-error {{no matching constructor}} +NoDefaultConstructor too_few_error3[3] = { }; // expected-error {{no matching constructor}} expected-note {{implicit initialization of array element 0}} // C++ [dcl.init.aggr]p8 struct Empty { }; |