<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 --- - Assertion `!A->getDeducedType().isNull() && "cannot request the size of an undeduced or dependent auto type"'"
href="http://llvm.org/bugs/show_bug.cgi?id=20745">20745</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion `!A->getDeducedType().isNull() && "cannot request the size of an undeduced or dependent auto type"'
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>alexfh@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Clang crashes on sizeof() of undeduced types:
$ cat crasher2.cc
template <class _Rp> struct function {
template <class _Fp> function(_Fp) {
static_assert(sizeof(_Fp) > 0, "Type must be complete.");
}
};
template <typename T> void p(T t) {
auto l = some_undefined_function(t);
function<void()>(([l]() {}));
}
void q() { p(0); }
$ ~/work/llvm-build-debug/bin/clang-check crasher2.cc -- -std=c++11
crasher2.cc:8:12: error: use of undeclared identifier 'some_undefined_function'
auto l = some_undefined_function(t);
^
crasher2.cc:11:12: note: in instantiation of function template specialization
'p<int>' requested here
void q() { p(0); }
^
clang-check: 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>