<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 - clang-cl and lld-link: Come up with a way to make typo correction work for '/' style flags"
href="https://bugs.llvm.org/show_bug.cgi?id=41787">41787</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang-cl and lld-link: Come up with a way to make typo correction work for '/' style flags
</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>All
</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>Driver
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nicolasweber@gmx.de
</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>clang-cl and lld-link accept /foo flags in addition to -foo flags.
Since /foo is also a valid path name on non-win, the logic goes like so:
1. If /foo is a known flag, treat it as flag (use -- to treat it as file name)
2. If it isn't, treat it as a file name
So if a /foo flag has a typo, we treat it as a filename, hence don't show typo
suggestions for it, and then show a "file not found" diagnostic.
We should find a way to make typo suggestions work for /foo style flags.
Ideas:
- Have typo suggestions for filenames as well, and have a unified candidate
list for both (idea from ruiu on issue 37006)
- Add "3. If file of this name doesn't exist, consider it as a possible typo of
a flag"
The former is a nicer user experience since it also gives us spelling
suggestions for typos in file names, but it requires getting a list of files
off disk (only in error cases though) and is more work to implement.</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>