Skip to content

[lldb][import-std-module] Clang parser assertion when lambda is imported from std module #149477

@Michael137

Description

@Michael137

This is a follow-up to #149390

#147389 introduced code in the fstream header that was using a function local lambda. This caused following import-std-module tests to fail:

16:22:51  ********************
16:22:51  Unresolved Tests (2):
16:22:51    lldb-api :: commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentListFromStdModule.py
16:22:51    lldb-api :: commands/expression/import-std-module/list/TestListFromStdModule.py

with following assertion:

Assertion failed: (capture_size() == Class->capture_size() && "Wrong number of captures"), function LambdaExpr, file ExprCXX.cpp, line 1277.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.

For now this was worked around by moving the lambda into a helper method. But we should really fix the underlying issue so libc++ is free to use whatever idioms they want to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:modulesC++20 modules and Clang Header ModulescrashPrefer [crash-on-valid] or [crash-on-invalid]lambdaC++11 lambda expressionslldb

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions