<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 --- - Crash on using declaration in member function of class template"
   href="http://llvm.org/bugs/show_bug.cgi?id=21933">21933</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash on using declaration in member function of class template
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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>Frontend
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>rnk@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Consider:

struct Base { int member; };
template <typename T>
struct A : public T {
  static void StaticFun() {
    using T::member;
    //(void)member; // error: may not access member in static method.
  }
};
template class Derived<Base>;

$ clang -cc1 t.cpp
Stack dump:
0.      Program arguments: D:\src\llvm\build_debug\bin\clang.exe -cc1 t.cpp
1.      t.cpp:20:3: current parser token '}'
2.      t.cpp:16:1: parsing struct/union/class body 'A'
3.      t.cpp:17:27: parsing function body 'StaticFun'
4.      t.cpp:17:27: in compound statement ('{}')
llvm::isa_impl_cl<clang::CXXRecordDecl,clang::DeclContext const *>::doit()
llvm::isa_impl_wrap<clang::CXXRecordDecl,clang::DeclContext const
*,clang::DeclContext const *>::doit()
llvm::isa_impl_wrap<clang::CXXRecordDecl,clang::DeclContext *
const,clang::DeclContext const *>::doit()
llvm::isa<clang::CXXRecordDecl,clang::DeclContext *>() + 0xC bytes(s),
d:\src\llvm\include\llvm\support\casting.h, line 134
llvm::dyn_cast<clang::CXXRecordDecl,clang::DeclContext>() + 0x14 bytes(s),
d:\src\llvm\include\llvm\support\casting.h, line 298
clang::Sema::CheckUsingDeclQualifier() + 0x74 bytes(s),
d:\src\llvm\tools\clang\lib\sema\semadeclcxx.cpp, line 8193
clang::Sema::BuildUsingDeclaration() + 0x2A7 bytes(s),
d:\src\llvm\tools\clang\lib\sema\semadeclcxx.cpp, line 7937
clang::Sema::ActOnUsingDeclaration() + 0x313 bytes(s),
d:\src\llvm\tools\clang\lib\sema\semadeclcxx.cpp, line 7556</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>