<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 --- - [ms] clang-cl emits definitions for methods of inner classes of template classes of the template has a dllimported instantiation declaration"
href="https://llvm.org/bugs/show_bug.cgi?id=27810">27810</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[ms] clang-cl emits definitions for methods of inner classes of template classes of the template has a dllimported instantiation declaration
</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>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nicolasweber@gmx.de
</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>Consider:
template <class T>
struct basic_ostream {
struct sentry {
sentry() {
}
};
};
template class __declspec(dllimport) basic_ostream<char>;
clang-cl emits basic_ostream<char>::sentry::sentry() for this. cl doesn't.
clang doesn't emit anything if this is an "extern template class". dllimported
instantiation declarations should probably do something similar to extern
templates in non-microsoft mode.
This causes us to emit a bunch of functions into the .obj of every TU that
includes <ostream> with Microsoft's headers, making codegen slower than
necessary.</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>