<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 --- - Long typenames produce extremely hard to read diagnostics and slow down compilation time"
href="https://llvm.org/bugs/show_bug.cgi?id=27793">27793</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Long typenames produce extremely hard to read diagnostics and slow down compilation time
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>vittorio.romeo@outlook.com
</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>Long typenames, usually generated by heavy template metaprogramming code,
result in errors that are extremely hard to read and parse. Furthermore, they
slow down compilation time significantly.
Here's a benchmark and example from the boost::di project:
<a href="http://melpon.org/wandbox/permlink/7Fh0u2oaQbDmkNV0">http://melpon.org/wandbox/permlink/7Fh0u2oaQbDmkNV0</a>
The benchmark shows:
* How unnecessarily long and hard-to-understand errors are.
* How typename erasure techniques can improve compilation times (define
TYPENAME_ERASURE to see compilation time improvements).
I've encountered this same issue in one of my projects (ECST) - errors were
impossible to understand before GCC 6 was released. GCC 6's produced errors
pinpoint the issue more accurately, but still produce an enormous amount of
unnecessary output.
I think this is primarily a defect in error reporting. A flag to control long
typename output would be desired and possibly necessary for projects that
require the generation of long typenames.
I also think that having compilation times speed up when erasing typenames
signals some sort of potential compilation optimization for long typenames.
P.S.: gcc has similar issues.
Links:
boost::di -> <a href="https://github.com/boost-experimental/di">https://github.com/boost-experimental/di</a>
ECST -> <a href="https://github.com/SuperV1234/ecst">https://github.com/SuperV1234/ecst</a></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>