<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 --- - Regression in __uuidof support: &__uuidof(X) template parameter turns into __uuidof(X)"
href="https://llvm.org/bugs/show_bug.cgi?id=24986">24986</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Regression in __uuidof support: &__uuidof(X) template parameter turns into __uuidof(X)
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>sebastian@theophil.net
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=14954" name="attach_14954" title="Self-contained reproduction">attachment 14954</a> <a href="attachment.cgi?id=14954&action=edit" title="Self-contained reproduction">[details]</a></span>
Self-contained reproduction
The COM headers use pointers to the IID/GUID struct as template parameters,
e.g. in the _com_IIID class. This was supported in clang 3.6 but stopped
working again in clang 3.7 onwards. The bug is still present in the Trunk, as
far as I can tell with <a href="http://melpon.org/wandbox">http://melpon.org/wandbox</a>
struct __declspec(uuid("00000000-0000-0000-c000-000000000046")) Test {};
template<typename _Interface, const IID* _IID /*= &__uuidof(_Interface)*/>
class _com_IIID {};
typedef _com_IIID<Test, &__uuidof(Test)> IID_Test
IID_Test is (silently) instantiated not with a IID const* but with the IID
itself. The attached example prints the instantiated types and IID_Test is
indeed a _com_IIID<Test, __uuidof(Test)> (note the missing & in front of
__uuidof)
To reproduce, compile the attached (complete) example with
c++ --std=c++1z -fms-extensions uuid.cpp</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>