[all-commits] [llvm/llvm-project] 23674b: [CIR] Implement handling for lambda capture of des...

Andy Kaylor via All-commits all-commits at lists.llvm.org
Mon Apr 13 16:30:23 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 23674b9cf3e45194f3f0b7ca0ada8a558f1d9c6d
      https://github.com/llvm/llvm-project/commit/23674b9cf3e45194f3f0b7ca0ada8a558f1d9c6d
  Author: Andy Kaylor <akaylor at nvidia.com>
  Date:   2026-04-13 (Mon, 13 Apr 2026)

  Changed paths:
    M clang/lib/CIR/CodeGen/CIRGenCleanup.cpp
    M clang/lib/CIR/CodeGen/CIRGenDecl.cpp
    M clang/lib/CIR/CodeGen/CIRGenExprAggregate.cpp
    M clang/lib/CIR/CodeGen/CIRGenFunction.h
    M clang/lib/CIR/Dialect/Transforms/FlattenCFG.cpp
    A clang/test/CIR/CodeGen/lambda-dtor-field.cpp

  Log Message:
  -----------
  [CIR] Implement handling for lambda capture of destructured types (#191316)

Lambda captures of variables that require destruction requires us to
created cleanup scopes with deferred deactivation. That is, the cleanup
scope is created, but added to a list that automatically deactivates the
cleanup when we exit the scope in the compiler code where the lambda is
being generated. This deferred deactivation mechanism will be needed for
other use cases as well, so it is implemented in a general way, which
closely follows the classic codegen handling.

Assisted-by: Cursor / claude-4.6-opus-high



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list