[all-commits] [llvm/llvm-project] 874067: [Sema] Preserve ContainsUnexpandedParameterPack in...

Younan Zhang via All-commits all-commits at lists.llvm.org
Mon Aug 5 19:55:06 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 874067a22f0f483dbe210d8547c06d564bfa7848
      https://github.com/llvm/llvm-project/commit/874067a22f0f483dbe210d8547c06d564bfa7848
  Author: Younan Zhang <zyn7109 at gmail.com>
  Date:   2024-08-06 (Tue, 06 Aug 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaLambda.cpp
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/lib/Sema/TreeTransform.h
    A clang/test/SemaCXX/fold_lambda_with_variadics.cpp

  Log Message:
  -----------
  [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (#86265)

The lambda `ContainsUnexpandedParameterPack` flag is used for the
expressions' dependency computing and is therefore essential for pack
expansion. We previously lost the flag's preservation during the
lambda's transform, which caused some issues, e.g. a fold expression
couldn't properly expand inside a template.

This patch alleviates the issue by retaining the flag in more scenarios.
Note that we still have problems with constraints involving packs
regarding lambdas, and dealing with that would take more effort, and
we'd like to fix them in the future.

Fixes https://github.com/llvm/llvm-project/issues/56852
Fixes https://github.com/llvm/llvm-project/issues/85667
Mitigates https://github.com/llvm/llvm-project/issues/99877 because the
attributes were not handled in this patch.

---------

Co-authored-by: Ilya Biryukov <809452+ilya-biryukov at users.noreply.github.com>
Co-authored-by: cor3ntin <corentinjabot at gmail.com>



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