[LLVMbugs] [Bug 16614] New: Template type diffing should be applied to non-templates
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jul 12 14:16:15 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16614
Bug ID: 16614
Summary: Template type diffing should be applied to
non-templates
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: dblaikie at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu,
rtrieu at google.com
Classification: Unclassified
I don't think there's any reason not to apply the convenience of type diffing
to non-templates such as:
void func(int*);
int main() {
const int i = 3;
func(&i);
func(3);
}
We produce a fairly specific diagnostic: "1st argument ('const int *') would
lose const qualifier", but I think the type diffing might actually be less
special-case and more helpful here ("'<const >int *' v 'int *'")
In the second case we just say "no known conversion from 'int' to 'int *' for
1st argument" - again, highlighting the '*' could be helpful with more deeply
nested types/names/diagnostics.
--
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/20130712/8326f98a/attachment.html>
More information about the llvm-bugs
mailing list