[LLVMbugs] [Bug 19050] New: add a note for hidden function overload candidates

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 4 20:49:49 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=19050

            Bug ID: 19050
           Summary: add a note for hidden function overload candidates
           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:

void f(int&);
class X {
 void f(double&);
 void g();
};
void X::g() { int i; f(i); }

what we produce is:

$ clang b13311225.cc 
b13311225.cc:6:24: error: non-const lvalue reference to type 'double' cannot
      bind to a value of unrelated type 'int'
void X::g() { int i; f(i); }
                       ^
b13311225.cc:3:17: note: passing argument to parameter here
  void f(double&);
                ^
1 error generated.

We should absolutely add a note for "this function was not a candidate because
its name is hidden".

-- 
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/20140305/65ff3321/attachment.html>


More information about the llvm-bugs mailing list