diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-07-24 20:28:49 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-07-24 20:28:49 +0000 |
commit | 7252f5110de3163a465aa50a2114c1fef9e848e8 (patch) | |
tree | 92d191d6ef5a35da507e54d59e9e7e2796bc8e91 /test/SemaCXX/constructor-initializer.cpp | |
parent | cad9f41b3e82df62910832273f900f8252530d4f (diff) |
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
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; +}; |