[LLVMbugs] [Bug 16619] New: Suggest deref/addressof on initialization
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Jul 13 11:28:13 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16619
Bug ID: 16619
Summary: Suggest deref/addressof on initialization
Product: clang
Version: unspecified
Hardware: PC
OS: All
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
Classification: Unclassified
We successfully suggest adding '*' or '&' on assignments but seem to miss this
in initializations:
assign.cpp:9:7: error: cannot initialize a variable of type 'int' with an
lvalue of type 'int *'
int b = a;
^ ~
assign.cpp:11:5: error: assigning to 'int *' from incompatible type 'int'; take
the address with &
a = c;
^ ~
&
assign.cpp:12:8: error: cannot initialize a variable of type 'int *' with an
lvalue of type 'int'
int *d = c;
^ ~
assign.cpp:13:5: error: assigning to 'int' from incompatible type 'int *';
dereference with *
c = a;
^ ~
*
--
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/20130713/393e01f7/attachment.html>
More information about the llvm-bugs
mailing list