<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 - Typo-correction selects different class name when only template arguments are missing"
href="https://bugs.llvm.org/show_bug.cgi?id=37192">37192</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Typo-correction selects different class name when only template arguments are missing
</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>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</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>rtrieu@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>$ cat status.cc
namespace foo {
class Status {};
template <typename T>
class StatusOr {};
} // namespace foo
template <typename T>
using StatusOr = ::foo::StatusOr;
$ clang status.cc
status.cc:10:25: error: no type named 'StatusOr' in namespace 'foo'; did you
mean 'Status'?
using StatusOr = ::foo::StatusOr;
~~~~~~~^~~~~~~~
Status
status.cc:2:7: note: 'Status' declared here
class Status {};
^
1 error generated.
On line 10, Clang generates an error. Instead of matching to StatusOr, the
templated class, and suggesting to add template arguments, Clang matches to
Status instead. In fact, Status, Status1, and Status12 would be preferred over
StatusOr despite being a perfect match for StatusOr. The other class has to be
named Statu or Status123 before it starts suggesting adding template arguments
for StatusOr.</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>