<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 --- - ms-extensions: Assertion failed: (hasUninstantiatedDefaultArg() && "Wrong kind of initialization expression!"), function getUninstantiatedDefaultArg, file tools/clang/lib/AST/Decl.cpp, line 2417."
href="https://llvm.org/bugs/show_bug.cgi?id=28082">28082</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ms-extensions: Assertion failed: (hasUninstantiatedDefaultArg() && "Wrong kind of initialization expression!"), function getUninstantiatedDefaultArg, file tools/clang/lib/AST/Decl.cpp, line 2417.
</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>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>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dimitry@andric.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>Created <span class=""><a href="attachment.cgi?id=16510" name="attach_16510" title="Reduced test case from ChakraCore">attachment 16510</a> <a href="attachment.cgi?id=16510&action=edit" title="Reduced test case from ChakraCore">[details]</a></span>
Reduced test case from ChakraCore
This bug was reported to me by Steve Wills (<a href="mailto:swills@FreeBSD.org">swills@FreeBSD.org</a>); it occurs
during compilation of ChakraCore (see <a href="https://github.com/microsoft/ChakraCore">https://github.com/microsoft/ChakraCore</a>)
The assertion only occurs when -fms-extensions is used, e.g.:
$ clang++ -fms-extensions -c chakra-testcase.cpp
chakra-testcase.cpp:7:20: warning: explicit specialization of 'EncodeT' within
class scope is a Microsoft extension [-Wmicrosoft-template]
template <> uint EncodeT<SmallLayout>(OpCodeAsmJs, ByteCodeWriter *, bool);
^
Assertion failed: (hasUninstantiatedDefaultArg() && "Wrong kind of
initialization expression!"), function getUninstantiatedDefaultArg, file
/usr/src/lib/clang/libclangast/../../../contrib/llvm/tools/clang/lib/AST/Decl.cpp,
line 2416.
Without -fms-extensions, there is only an error about the explicit
specialization, but no assertion:
$ clang++ -c chakra-testcase.cpp
chakra-testcase.cpp:7:20: error: explicit specialization of 'EncodeT' in class
scope
template <> uint EncodeT<SmallLayout>(OpCodeAsmJs, ByteCodeWriter *, bool);
^
chakra-testcase.cpp:8:2: error: expected ';' after struct
}
^
;
2 errors generated.</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>