aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorMichael Buch <michaelbuch12@gmail.com>2025-08-22 20:33:59 +0100
committerGitHub <noreply@github.com>2025-08-22 19:33:59 +0000
commit0bbb79475432f72ee0e7d99cc5dc48bb8f8ff443 (patch)
tree5e4a8e1e66ce7982cc685a1d6f35c714b459d0f5 /llvm/lib/CodeGen/MachineFunction.cpp
parentde6bd152b904eec27764bf238b57fbecd2df5758 (diff)
downloadllvm-0bbb79475432f72ee0e7d99cc5dc48bb8f8ff443.zip
llvm-0bbb79475432f72ee0e7d99cc5dc48bb8f8ff443.tar.gz
llvm-0bbb79475432f72ee0e7d99cc5dc48bb8f8ff443.tar.bz2
[lldb][ClangASTImporter] Don't ASTImport LambdaExpr nodes (#154962)
This patch works around an assertion that we hit in the `LambdaExpr` constructor when we call it from `ASTNodeImporter::VisitLambdaExpr` (see https://github.com/llvm/llvm-project/issues/149477). The lambda that we imported doesn't have the `NumCaptures` field accurately set to the one on the source decl. This is because in `MinimalImport` mode, we skip importing of lambda definitions: https://github.com/llvm/llvm-project/blob/e21b0dd81928a3266df0e3ede008fb7a6676ff95/clang/lib/AST/ASTImporter.cpp#L2499 In practice we have seen this assertion occur in our `import-std-module` test-suite when libc++ headers decide to use lambdas inside inline function bodies (the latest failure being caused by https://github.com/llvm/llvm-project/pull/144602). To avoid running into this whenever libc++ decides to use lambdas in headers, this patch skips `ASTImport` of lambdas alltogether. Ideally this would bubble up to the user or log as an error, but we swallow the `ASTImportError`s currently. The only way this codepath is hit is when lambdas are used inside functions in defined in the expression evaluator, or when importing AST nodes from Clang modules. Both of these are very niche use-cases (for now), so a workaround seemed appropriate.
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions