[LLVMbugs] [Bug 21803] New: wordsmith viable conversion error message for function return type
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Dec 9 19:42:04 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=21803
Bug ID: 21803
Summary: wordsmith viable conversion error message for function
return type
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: nlewycky at google.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Testcase:
template<typename A, typename B = int> class X {};
X<float> f() {
return X<float, double>();
}
$ clang b13910958.cc -fsyntax-only
b13910958.cc:4:10: error: no viable conversion from 'X<[...], double>' to
'X<[...], (default) int>'
return X<float, double>();
^~~~~~~~~~~~~~~~~~
b13910958.cc:1:46: note: candidate constructor (the implicit copy constructor)
not viable: no known conversion from 'X<float, double>' to
'const X<float, int> &' for 1st argument
template<typename A, typename B = int> class X {};
^
1 error generated.
Better would be "error: no viable conversion from returned value of type
'X<[...], double>' to function return type 'X<[...], (default) int>'"
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141210/aa707e06/attachment.html>
More information about the llvm-bugs
mailing list