[all-commits] [llvm/llvm-project] e1111e: [Clang] Correctly capture bindings in dependent la...

cor3ntin via All-commits all-commits at lists.llvm.org
Mon Jan 9 12:21:12 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e1111e2056e7245b21e24816f6f7ef5ac016ed6f
      https://github.com/llvm/llvm-project/commit/e1111e2056e7245b21e24816f6f7ef5ac016ed6f
  Author: Corentin Jabot <corentinjabot at gmail.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M clang/include/clang/AST/Decl.h
    M clang/include/clang/Sema/ScopeInfo.h
    M clang/include/clang/Sema/Sema.h
    M clang/include/clang/Sema/SemaLambda.h
    M clang/lib/AST/DeclCXX.cpp
    M clang/lib/Sema/ScopeInfo.cpp
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/lib/Sema/SemaLambda.cpp
    M clang/lib/Sema/TreeTransform.h
    M clang/test/SemaCXX/cxx20-decomposition.cpp

  Log Message:
  -----------
  [Clang] Correctly capture bindings in dependent lambdas.

Structured bindings were not properly marked odr-used
and therefore captured in generic lambddas.

Fixes #57826

It is unclear to me if further simplification can be gained
through the allowance described in
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0588r1.html.

Either way, I think this makes support for P0588 completes,
but we probably want to add test for that in a separate PR.
(and I lack confidence I understand P0588 sufficiently to assert
the completeness of our cnformance).

Reviewed By: aaron.ballman, #clang-language-wg

Differential Revision: https://reviews.llvm.org/D137244




More information about the All-commits mailing list