diff options
| author | Richard Smith <richard@metafoo.co.uk> | 2020-01-09 12:27:48 -0800 |
|---|---|---|
| committer | Richard Smith <richard@metafoo.co.uk> | 2020-01-09 15:15:02 -0800 |
| commit | 25195541349b1d6dfc03bf7511483110bda69b29 (patch) | |
| tree | cdcee3e0776135430053c679e0c386fb164ad021 /clang/test/SemaCXX/conversion-function.cpp | |
| parent | 68c8b6c4cd117cc962155298f0e1d45056ecc001 (diff) | |
| download | bcm5719-llvm-25195541349b1d6dfc03bf7511483110bda69b29.tar.gz bcm5719-llvm-25195541349b1d6dfc03bf7511483110bda69b29.zip | |
When diagnosing the lack of a viable conversion function, also list
explicit functions that are not candidates.
It's not always obvious that the reason a conversion was not possible is
because the function you wanted to call is 'explicit', so explicitly say
if that's the case.
It would be nice to rank the explicit candidates higher in the
diagnostic if an implicit conversion sequence exists for their
arguments, but unfortunately we can't determine that without potentially
triggering non-immediate-context errors that we're not permitted to
produce.
Diffstat (limited to 'clang/test/SemaCXX/conversion-function.cpp')
| -rw-r--r-- | clang/test/SemaCXX/conversion-function.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/conversion-function.cpp b/clang/test/SemaCXX/conversion-function.cpp index 1d3593d8ed1..1486abea8c6 100644 --- a/clang/test/SemaCXX/conversion-function.cpp +++ b/clang/test/SemaCXX/conversion-function.cpp @@ -211,7 +211,7 @@ namespace smart_ptr { // expected-note@-2 {{candidate constructor (the implicit move constructor) not}} #endif - explicit X(Y); + explicit X(Y); // expected-note {{not a candidate}} }; Y make_Y(); |

