<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 - Member access to incomplete type from dllimport"
href="https://bugs.llvm.org/show_bug.cgi?id=35435">35435</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Member access to incomplete type from dllimport
</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>An explicit instantiation request should be ignored when it’s trying to
instantiate a dllimport class.
Reproducer:
class __declspec(dllimport) Edge;
template <class T>
class __declspec(dllimport) Range
{
void insert(T *obj) { obj->loc(); }
};
template void Range<Edge>::insert(Edge *);
ksh-3.2$ clang -c t1.cpp
t1.cpp:10:28: error: member access into incomplete type 'test1::Edge'
void insert(T *obj) { obj->loc(); }
^
t1.cpp:13:28: note: in instantiation of member function
'test1::Range<test1::Edge>::insert' requested here
template void Range<Edge>::insert(Edge *);
^
t1.cpp:5:29: note: forward declaration of 'test1::Edge'
class __declspec(dllimport) Edge;
^
t1.cpp:22:28: error: member access into incomplete type 'test2::Edge'
void insert(T* obj) { obj->loc(); }
^
t1.cpp:25:28: note: in instantiation of member function
'test2::Range<test2::Edge>::insert' requested here
template void Range<Edge>::insert(Edge *);
^
t1.cpp:17:29: note: forward declaration of 'test2::Edge'
class __declspec(dllexport) Edge;
^
2 errors generated.</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>