<html>
<head>
<base href="http://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 --- - Crash on invalid"
href="http://llvm.org/bugs/show_bug.cgi?id=20833">20833</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Crash on invalid
</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>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>klimek@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=12974" name="attach_12974" title="Crash report">attachment 12974</a> <a href="attachment.cgi?id=12974&action=edit" title="Crash report">[details]</a></span>
Crash report
$ cat /tmp/t.cc
template <typename T>
struct A {
T t;
};
template <typename F>
void g(F f) {
auto a = A<decltype(f())>{};
auto xf = [a, f]() {};
int x = sizeof(xf);
};
void f() {
g([] {});
}
See attached crash report.
$ cat /tmp/crash-report
/tmp/t.cc:3:5: error: field has incomplete type 'void'
T t;
^
/tmp/t.cc:7:12: note: in instantiation of template class 'A<void>' requested
here
auto a = A<decltype(f())>{};
^
/tmp/t.cc:12:3: note: in instantiation of function template specialization
'g<(lambda at /tmp/t.cc:12:5)>' requested here
g([] {});
^
clang-3.5:
/usr/local/google/home/klimek/src/llvm/tools/clang/lib/AST/ASTContext.cpp:1694:
clang::TypeInfo clang::ASTContext::getTypeInfoImpl(const clang::Type *) const:
Assertion `!A->getDeducedType().isNull() && "cannot request the size of an
undeduced or dependent auto type"' failed.</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>