================ @@ -1696,7 +1696,11 @@ static NamedDecl* getLambdaCallOperatorHelper(const CXXRecordDecl &RD) { RD.getASTContext().DeclarationNames.getCXXOperatorName(OO_Call); DeclContext::lookup_result Calls = RD.lookup(Name); - assert(!Calls.empty() && "Missing lambda call operator!"); + + // This can happen while building the lambda. + if (Calls.empty()) + return nullptr; ---------------- cor3ntin wrote:
I added an assert, which hinges on the fact that we don't look at the static invoker in cases where the lambda is incomplete. I agree that having these various states in lambdas is a bit unfortunate, but it is a consequence of P2036. If you have a better solution, I'm all ears! https://github.com/llvm/llvm-project/pull/138121 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits