More Sema check for constructor's member initializer along
with type conversion to fix ir-gen crash.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77000 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/constructor-initializer.cpp b/test/SemaCXX/constructor-initializer.cpp
index 71d38a1..3909cd9 100644
--- a/test/SemaCXX/constructor-initializer.cpp
+++ b/test/SemaCXX/constructor-initializer.cpp
@@ -98,8 +98,7 @@
};
// 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 @@
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;
+};