<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Bad Diagnostic: conversion from overloaded function doesn't provide enough context"
   href="http://llvm.org/bugs/show_bug.cgi?id=16781">16781</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Bad Diagnostic: conversion from overloaded function doesn't provide enough context
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Keywords</th>
          <td>googler
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dblaikie@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu, rikka@google.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat str.cpp
void func(void (*)(bool));
void f(const int&);
void f(int);

int main() {
  func(f);
}
$ clang++-tot str.cpp -fsyntax-only
str.cpp:6:3: error: no matching function for call to 'func'
  func(f);
  ^~~~
str.cpp:1:6: note: candidate function not viable: no overload of 'f' matching
'void (*)(bool)' for 1st argument
void func(void (*)(bool));
     ^
1 error generated.

Not mentioning the overloads in the overload set of 'f' makes this hard to
track down if the overloads are distant from the callsite. In the original case
this bug came from there was another function with the same name but the right
arguments elsewhere (it was a member of a class, in this instance - but could
be in another namespace, etc).

(CC Kaelyn in case she wants to tackle this with typo correction (add a
"namespace (or class) foo { void f(bool); }" to the example above and suggest
that as a solution to this error) - though we'll probably still want to fix the
underlying issue anyway)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>