http://llvm.org/bugs/show_bug.cgi?id=19454
Bug ID: 19454
Summary: missing 'did you mean to deference' diagnostic
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
Not sure why I didn't get the "dereference the argument with *" diagnostic
here:
lib/Parse/ParseDeclCXX.cpp:1546:11: error: non-const lvalue reference to type
'clang::TemplateIdAnnotation' cannot bind to a value of unrelated type
'clang::TemplateIdAnnotation *'
TemplateId, attrs.getList(),
^~~~~~~~~~
include/clang/Sema/Sema.h:5282:58: note: passing argument to parameter
'TemplateId' here
TemplateIdAnnotation &TemplateId,
^
Reduced testcase:
struct S { void f(int &); } s;
void g(int *p) { s.f(p); }
<stdin>:2:24: error: non-const lvalue reference to type 'int' cannot bind to a
value of unrelated type 'int *'
void g(int *p) { s.f(p); }
^
<stdin>:1:26: note: passing argument to parameter here
struct S { void f(int &); } s;
^
I'd expect the problem here is that we skip overload resolution, and so we
don't get its brand of diagnostic improvements.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs