diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-19 03:01:41 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-19 03:01:41 +0000 |
commit | a4b592a7d5892001b53f51fe936c77d340e6df38 (patch) | |
tree | ed409ff8cc553a6b1fba5db61af72bbefc8e0c8d /clang/test/SemaCXX/copy-initialization.cpp | |
parent | 04cc307eddae4681709cb4f019e5f9363e0506c3 (diff) | |
download | bcm5719-llvm-a4b592a7d5892001b53f51fe936c77d340e6df38.tar.gz bcm5719-llvm-a4b592a7d5892001b53f51fe936c77d340e6df38.zip |
Switch more of Sema::CheckInitializerTypes over to
InitializationSequence. Specially, switch initialization of a C++
class type (either copy- or direct-initialization).
Also, make sure that we create an elidable copy-construction when
performing copy initialization of a C++ class variable. Fixes PR5826.
llvm-svn: 91750
Diffstat (limited to 'clang/test/SemaCXX/copy-initialization.cpp')
-rw-r--r-- | clang/test/SemaCXX/copy-initialization.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/SemaCXX/copy-initialization.cpp b/clang/test/SemaCXX/copy-initialization.cpp index 8df0c6340f8..ad149232a4e 100644 --- a/clang/test/SemaCXX/copy-initialization.cpp +++ b/clang/test/SemaCXX/copy-initialization.cpp @@ -2,17 +2,17 @@ class X { public: explicit X(const X&); - X(int*); // expected-note{{candidate function}} + X(int*); // expected-note 2{{candidate function}} explicit X(float*); }; class Y : public X { }; void f(Y y, int *ip, float *fp) { - X x1 = y; // expected-error{{no matching constructor for initialization of 'x1'; candidate is:}} + X x1 = y; // expected-error{{no matching constructor for initialization of 'class X'}} X x2 = 0; X x3 = ip; - X x4 = fp; // expected-error{{cannot initialize 'x4' with an lvalue of type 'float *'}} + X x4 = fp; // expected-error{{no viable conversion}} } struct foo { |