[all-commits] [llvm/llvm-project] f9ded0: [CIR] Fix incorrect ConstArrayAttr trailing_zeros ...

Artemiy via All-commits all-commits at lists.llvm.org
Tue Mar 31 13:41:00 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f9ded0e30a24d5faf4c810888da1837b41cbe718
      https://github.com/llvm/llvm-project/commit/f9ded0e30a24d5faf4c810888da1837b41cbe718
  Author: Artemiy <notlebedev at gmail.com>
  Date:   2026-03-31 (Tue, 31 Mar 2026)

  Changed paths:
    M clang/lib/CIR/Dialect/IR/CIRAttrs.cpp
    A clang/test/CIR/IR/string-trailing-zeros.cir

  Log Message:
  -----------
  [CIR] Fix incorrect ConstArrayAttr trailing_zeros parsing (#188742)

Closes #187699 .

Fix incorrect parsing of `ConstArrayAttr`. `parse` method incorrectly
used type of `elts` parameter as type of the whole array. This means
that when reading back text or bytecode clangir files attribute did not
have correct type and correct `trailingZerosNum`. Type was always of
inner `elts`, meaning smaller then actual type if any trailing zeros
were present and `trailingZerosNum` was always zero.



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