diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2015-08-25 22:18:46 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2015-08-25 22:18:46 +0000 |
| commit | 08426e2098aaab9b26bf236fe6ce9570e9ea3c4a (patch) | |
| tree | 294e5d3830930947e85299fda9fe1ed902c528bc /clang/test | |
| parent | 73a7c93a0a55d5fea3c91dd5a21eb237eb7fddf0 (diff) | |
| download | bcm5719-llvm-08426e2098aaab9b26bf236fe6ce9570e9ea3c4a.tar.gz bcm5719-llvm-08426e2098aaab9b26bf236fe6ce9570e9ea3c4a.zip | |
Clarify the error message when the reason the conversion is not viable is because the returned value does not match the function return type.
llvm-svn: 245979
Diffstat (limited to 'clang/test')
3 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3-generic-lambda-1y.cpp b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3-generic-lambda-1y.cpp index 65b085bcec1..07bc884e7d5 100644 --- a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3-generic-lambda-1y.cpp +++ b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3-generic-lambda-1y.cpp @@ -49,7 +49,7 @@ int main() static double dfi(int i) { return i + 3.14; } static Local localfi(int) { return Local{}; } }; - auto l4 = [](auto (*fp)(int)) -> int { return fp(3); }; //expected-error{{no viable conversion from 'Local' to 'int'}} + auto l4 = [](auto (*fp)(int)) -> int { return fp(3); }; //expected-error{{no viable conversion from returned value of type 'Local' to function return type 'int'}} l4(&Local::ifi); l4(&Local::cfi); l4(&Local::dfi); diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp index c18bb7d1921..e40761770d5 100644 --- a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp @@ -38,7 +38,7 @@ template X captures(X, X); template<typename T> int infer_result(T x, T y) { auto lambda = [=](bool b) { return x + y; }; - return lambda(true); // expected-error{{no viable conversion from 'X' to 'int'}} + return lambda(true); // expected-error{{no viable conversion from returned value of type 'X' to function return type 'int'}} } template int infer_result(int, int); diff --git a/clang/test/SemaCXX/rval-references.cpp b/clang/test/SemaCXX/rval-references.cpp index fc341e87f4a..9c79ad7b0b9 100644 --- a/clang/test/SemaCXX/rval-references.cpp +++ b/clang/test/SemaCXX/rval-references.cpp @@ -90,5 +90,5 @@ MoveOnly returningNonEligible() { else if (0) // Copy from reference can't be elided return r; // expected-error {{call to deleted constructor}} else // Construction from different type can't be elided - return i; // expected-error {{no viable conversion from 'int' to 'MoveOnly'}} + return i; // expected-error {{no viable conversion from returned value of type 'int' to function return type 'MoveOnly'}} } |

