| |
| Bugzilla Link | 42857 |
| Resolution | FIXED |
| Resolved on | Aug 05, 2019 00:32 |
| Version | trunk |
| OS | Linux |
| Blocks | #41819 |
| CC | @zygoloid |
Extended Description
struct Bar { Bar(); };
template struct Foo { __declspec(dllexport) Foo() = default; Bar b; };
template class Foo;
$ clang -c -target i686-pc-win32 /tmp/b.cc
clang-9: /work/llvm.monorepo/clang/lib/CodeGen/CodeGenFunction.cpp:662: void clang::CodeGen::CodeGenFunction::StartFunction(clang::GlobalDecl, clang::QualType, llvm::Function*, const clang::CodeGen::CGFunctionInfo&, const clang::CodeGen::FunctionArgList&, clang::SourceLocation, clang::SourceLocation): Assertion `CurFn->isDeclaration() && "Function already has body?"' failed.
Reported by Alexandre here: https://reviews.llvm.org/D65511#1608860