diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-11-18 18:26:29 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-11-18 18:26:29 +0000 |
commit | cc5306ac8a39cdd5e7f83e597cba911e97c4a595 (patch) | |
tree | 79e3bbae91eebf51db844dcbf22ead92f7e997fe /test/SemaTemplate/constructor-template.cpp | |
parent | 76d69bb7f984c390f90504a06dfc7485387ffdd7 (diff) |
Improve on diagnosing type mismatches because of
lack of viable convesion functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89216 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/constructor-template.cpp')
-rw-r--r-- | test/SemaTemplate/constructor-template.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/SemaTemplate/constructor-template.cpp b/test/SemaTemplate/constructor-template.cpp index 12c6f8b9c1..203977e9ed 100644 --- a/test/SemaTemplate/constructor-template.cpp +++ b/test/SemaTemplate/constructor-template.cpp @@ -53,7 +53,7 @@ struct B { A<int> x; B(B& a) : x(a.x) {} }; struct X2 { X2(); - X2(X2&); + X2(X2&); // expected-note {{candidate function}} template<typename T> X2(T); }; @@ -61,7 +61,7 @@ X2 test(bool Cond, X2 x2) { if (Cond) return x2; // okay, uses copy constructor - return X2(); // expected-error{{incompatible type}} + return X2(); // expected-error{{no viable conversion from 'struct X2' to 'struct X2' is possible}} } struct X3 { @@ -73,12 +73,12 @@ template<> X3::X3(X3); // expected-error{{must pass its first argument by refere struct X4 { X4(); ~X4(); - X4(X4&); + X4(X4&); // expected-note {{candidate function}} template<typename T> X4(const T&, int = 17); }; X4 test_X4(bool Cond, X4 x4) { X4 a(x4, 17); // okay, constructor template X4 b(x4); // okay, copy constructor - return X4(); // expected-error{{incompatible type}} + return X4(); // expected-error{{no viable conversion}} } |