[LLVMbugs] [Bug 20745] New: Assertion `!A->getDeducedType().isNull() && "cannot request the size of an undeduced or dependent auto type"'
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Aug 25 11:15:28 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20745
Bug ID: 20745
Summary: Assertion `!A->getDeducedType().isNull() && "cannot
request the size of an undeduced or dependent auto
type"'
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: alexfh at google.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140825/59445bfe/attachment.html>
More information about the llvm-bugs
mailing list