[all-commits] [llvm/llvm-project] 410d63: [Sema] Avoid an undesired pack expansion while tra...

Younan Zhang via All-commits all-commits at lists.llvm.org
Tue Apr 30 20:52:36 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 410d6350eda322de213941b36adcdab13a0b557b
      https://github.com/llvm/llvm-project/commit/410d6350eda322de213941b36adcdab13a0b557b
  Author: Younan Zhang <zyn7109 at gmail.com>
  Date:   2024-05-01 (Wed, 01 May 2024)

  Changed paths:
    M clang/lib/AST/ExprClassification.cpp
    M clang/lib/Sema/TreeTransform.h
    M clang/test/SemaCXX/cxx2c-pack-indexing.cpp

  Log Message:
  -----------
  [Sema] Avoid an undesired pack expansion while transforming PackIndexingType (#90195)

A pack indexing type can appear in a larger pack expansion, e.g
`Pack...[pack_of_indexes]...` so we need to temporarily disable
substitution of pack elements.

Besides, this patch also fixes an assertion failure in
`PackIndexingExpr::classify`: dependent `PackIndexingExpr`s are always
LValues and thus we don't need to consider their `IndexExpr`s.

Fixes https://github.com/llvm/llvm-project/issues/88925

---------

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