Hi,
I’m getting the following assertion failure on the latest clang master:
clang::CXXMethodDecl* clang::CXXRecordDecl::getLambdaStaticInvoker() const: Assertion `Invoker.size() == 1 && “More than one static invoker operator!”’ failed.
I managed to narrow it down to the following test case which is basically a simplified version of https://github.com/llvm-mirror/clang/blob/master/test/Modules/merge-lambdas.cpp:
$ clang++ -fmodules test.cpp
// BEGIN TEST CASE (test.cpp)
#pragma clang module build A
module A {}
#pragma clang module contents
#pragma clang module begin A
template auto f() { return []{}; }
#pragma clang module end
#pragma clang module endbuild
#pragma clang module build B
module B {}
#pragma clang module contents
#pragma clang module begin B
#pragma clang module import A
inline auto x1() { return f(); }
#pragma clang module end
#pragma clang module endbuild
#pragma clang module build C
module C {}
#pragma clang module contents
#pragma clang module begin C
#pragma clang module import A
inline auto y1() { return f(); }
#pragma clang module end
#pragma clang module endbuild
#pragma clang module import B
#pragma clang module import C
using T = decltype(x1);
using T = decltype(y1);
// END TEST CASE
Should the assertion in question be relaxed or is there something missing in the merge to reconcile static invokers?
Cheers,
Victor