<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 - Crash: templated lambda capturing another lambda object"
href="https://bugs.llvm.org/show_bug.cgi?id=45828">45828</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Crash: templated lambda capturing another lambda object
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>9.0
</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>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++2a
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>maurimo@fb.com
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=23458" name="attach_23458" title="simple crash test case">attachment 23458</a> <a href="attachment.cgi?id=23458&action=edit" title="simple crash test case">[details]</a></span>
simple crash test case
Attaching a small self-conteined example that crashes Clang++ 9 through current
10/11 snapshot. Gcc 8+ appears to work fine.
Command:
clang++-9 -O0 -c -emit-llvm -std=c++2a crash.cpp
Versions:
clang++-9: 9.0.0-2~ubuntu18.04.2
clang++-10: 10.0.1-++20200506082601+98f9f73f6d2-1~exp1~20200506183223.15
clang++-11: 11.0.0-++20200506063826+6d6d48add8a-1~exp1~20200506164428.1667
Inline Code:
struct Enum {
template<typename F>
static void eachWithIndex(F&& f) {
f.template operator()<0, short>();
f.template operator()<1, long>();
}
};
struct Config {
template<typename F>
static void enumerate(F&& f) {
Enum::eachWithIndex([&]<int i, typename Pi>(){
f.template operator()<i>();
});
}
};
int main() {
Config::enumerate([&]<int i>(){
});
}</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>