[LLVMbugs] [Bug 20833] New: Crash on invalid

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Sep 2 06:04:45 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20833

            Bug ID: 20833
           Summary: Crash on invalid
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: klimek at google.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12974
  --> http://llvm.org/bugs/attachment.cgi?id=12974&action=edit
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.

-- 
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/20140902/9044a11f/attachment.html>


More information about the llvm-bugs mailing list