diff options
Diffstat (limited to 'test/SemaCXX/constructor-initializer.cpp')
-rw-r--r-- | test/SemaCXX/constructor-initializer.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/SemaCXX/constructor-initializer.cpp b/test/SemaCXX/constructor-initializer.cpp index 71d38a1438..3909cd984d 100644 --- a/test/SemaCXX/constructor-initializer.cpp +++ b/test/SemaCXX/constructor-initializer.cpp @@ -98,8 +98,7 @@ struct Current : Derived { }; // FIXME. This is bad message! -struct M { // expected-note {{candidate function}} \ - // expected-note {{candidate function}} +struct M { M(int i, int j); // expected-note {{candidate function}} \ // // expected-note {{candidate function}} }; @@ -115,4 +114,11 @@ struct P : M { // expected-error {{default constructor for 'struct M' is missin M m; // expected-error {{default constructor for 'struct M' is missing in initialization of mamber}} }; +struct Q { + Q() : f1(1,2), // expected-error {{Too many arguments for member initializer 'f1'}} + pf(0.0) { } // expected-error {{incompatible type passing 'double', expected 'float *'}} + float f1; + + float *pf; +}; |