<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 - missing const qualifier in two DenseSetImpl overloaded operators (Clang build fails)"
href="https://bugs.llvm.org/show_bug.cgi?id=32295">32295</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>missing const qualifier in two DenseSetImpl overloaded operators (Clang build fails)
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>4.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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>herrameise@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>The overloaded indirection operators ("*" and "->") for the DenseSetImpl class
are missing "const" qualifiers. Interestingly, this does not affect building
LLVM itself, but it will cause the Clang build to fail in Visual Studio 2015,
Visual Studio 2017, and possibly other toolchains.
FIX: "llvm-4.0.0.src/include/llvm/ADT/DenseSet.h"
- 106 ValueT &operator*() { return I->getFirst(); }
- 107 ValueT *operator->() { return &I->getFirst(); }
+ 106 ValueT &operator*() const { return I->getFirst(); }
+ 107 ValueT *operator->() const { return &I->getFirst(); }
It looks like someone actually brought this up on the mailing list in January
but didn't get any response
(<a href="http://lists.llvm.org/pipermail/llvm-dev/2017-January/108647.html">http://lists.llvm.org/pipermail/llvm-dev/2017-January/108647.html</a>), so
hopefully this makes it into the next bugfix release. I don't use LLVM on
Linux, so I'm not sure if that Clang build is also affected</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>