<html>
    <head>
      <base href="https://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 --- - Misleading error message when using a member operator with an incomplete type"
   href="https://llvm.org/bugs/show_bug.cgi?id=25738">25738</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Misleading error message when using a member operator with an incomplete type
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.7
          </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>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>eyenseo@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=15396" name="attach_15396" title="Minimal example">attachment 15396</a> <a href="attachment.cgi?id=15396&action=edit" title="Minimal example">[details]</a></span>
Minimal example

Hello,

I found this (annoyingly) misleading error message.
When you use an operator of a type that is incomplete the error will not inform
you that the type is missing but that there is no such operator.

I would suggest that if an operator can not be found an additional check should
be made, that checks if all types that the operator is using are complete. If
one type is incomplete that should be the error message instead of the 'no
viable overloaded operator' one - or an additional note.

Attached you'll find a minimal example.


System: Linux 3.19.0-37-generic #42~14.04.1-Ubuntu SMP Mon Nov 23 15:13:51 UTC
2015 x86_64
Clang version: Ubuntu clang version 3.7.1-svn253742-1~exp1</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>