<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 --- - UNREACHALBE at IdentifierResolver.cpp:78 when friend-ing a using declaratoin"
   href="http://llvm.org/bugs/show_bug.cgi?id=15485">15485</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>UNREACHALBE at IdentifierResolver.cpp:78 when friend-ing a using declaratoin
          </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>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>stephenwlin@gmail.com
          </td>
        </tr>

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

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=10162" name="attach_10162" title="source causing error">attachment 10162</a> <a href="attachment.cgi?id=10162&action=edit" title="source causing error">[details]</a></span>
source causing error

The following code (which is not legal anyway, I think):

struct A
{
    void delete_foo();
};

struct B : public A
{
    using A::delete_foo;
};

struct Foo { friend void B::delete_foo(); private: ~Foo() { } };

results in an llvm_unreachable being hit in clang trunk; similar results are
obtained when friending a namespace-scope using declaration.

I've debugged the error and made a small patch which seems to resolve the issue
(friendusing.patch); this makes the code trigger an error (</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>