<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - DLL import/export and explicit instantiation"
   href="https://bugs.llvm.org/show_bug.cgi?id=32989">32989</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>DLL import/export and explicit instantiation
          </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>enhancement
          </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>zahira.ammarguellat@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>ksh-3.2$ cat test.cpp
struct I;
template<typename T> struct __declspec(dllimport) X {
  void f(T *p) { p->i(); }
  void f();                 // f is now overloaded.
};
template void X<I>::f(I*);
ksh-3.2$

ksh-3.2$ which cl
c:/Program files (x86)/Microsoft Visual Studio 14.0/VC/BIN/amd64/cl.EXE

ksh-3.2$ cl -c -Zi test.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

test.cpp

ksh-3.2$ clang -v
clang version 5.0.0 (cfe/trunk 302180)
Target: x86_64-pc-windows-msvc
Thread model: posix

ksh-3.2$ clang -c -g test.cpp
test.cpp:3:19: error: member access into incomplete type 'I'
  void f(T *p) { p->i(); }
                  ^
test.cpp:6:21: note: in instantiation of member function 'X<I>::f' requested
here
template void X<I>::f(I*);
                    ^
test.cpp:1:8: note: forward declaration of 'I'
struct I;
       ^
1 error generated.
ksh-3.2$</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>