[cfe-dev] "More than one static invoker operator" assertion failure on merged lambdas
Victor Zverovich via cfe-dev
cfe-dev at lists.llvm.org
Wed Aug 1 17:56:18 PDT 2018
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<typename T> 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<int>(); }
#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<int>(); }
#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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180801/6f4345dd/attachment.html>
More information about the cfe-dev
mailing list