<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 - [MSFT C++ ABI] Incomplete/incorrect name mangling for function with auto return type"
href="https://bugs.llvm.org/show_bug.cgi?id=52000">52000</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[MSFT C++ ABI] Incomplete/incorrect name mangling for function with auto return type
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>12.0
</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>LLVM Codegen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>lennoxhoe@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>[MSFT ABI] clang-cl produces symbols with incorrect mangling when given a
function with automatic return type deduction.
Observe:
<span class="quote">>type test.cpp</span >
__declspec(dllexport) auto get_int() {
return int(42);
}
<span class="quote">>cl | findstr Version</span >
Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29111 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
<span class="quote">>clang-cl --version | findstr version</span >
clang version 12.0.1
---------------------------------------------------
<span class="quote">>cl /nologo /LD test.cpp</span >
test.cpp
Creating library test.lib and object test.exp
<span class="quote">>dumpbin /nologo /exports test.dll | findstr get_int</span >
1 0 00001000 ?get_int@@YAHXZ
---------------------------------------------------
<span class="quote">>clang-cl /nologo /LD test.cpp</span >
Creating library test.lib and object test.exp
<span class="quote">>dumpbin /nologo /exports test.dll | findstr get_int</span >
1 0 00001000 ?get_int@@YA?A?<auto>@@XZ</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>