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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to