<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 front end failure with xlocale from VS 2019 v16.1"
href="https://bugs.llvm.org/show_bug.cgi?id=42005">42005</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang-cl front end failure with xlocale from VS 2019 v16.1
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>8.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>brian.apps@oxfordsemantic.tech
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=22013" name="attach_22013" title="Preprocessed source and script">attachment 22013</a> <a href="attachment.cgi?id=22013&action=edit" title="Preprocessed source and script">[details]</a></span>
Preprocessed source and script
I recently upgraded my system to Visual Studio 2019 16.1. When I build my
product with clang-cl v8.0.0, I now see the following error:
clang-cl: error: clang frontend command failed due to signal (use -v to see
invocation)
I've boiled the problem down to a few lines and the statement `return new
std::fstream(s, std::ofstream out | std::ofstream::trunc);` A script and
preprocessed source are attached.
Further digging around shows clang 7.0 works fine but both 8.0.1-rc1 and a
preview of 9.0.0 fail. I see different errors messages, which may aid
identification:
Assertion failed: Idx < size() && "Template parameter index out-of-range", file
C:\clang\llvm-project\clang\include\clang/AST/DeclTemplate.h, line 138
and
1. <eof> parser at end of file
2. Per-file LLVM IR generation
3. C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.21.27702\include\xlocale:781:37:
Generating code for declaration 'std::codecvt<char, char,
_Mbstatet>::do_always_noconv'
The above error points at the xlocale header file. If I edit this function and
change line 783 from
return is_same_v<_Byte, _Elem>;
to
return is_same_v<_Byte, _Elem> ? true : false;
then my product compiles without error.</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>