[all-commits] [llvm/llvm-project] 32e136: [CIR][NFC] Fix build problems with [[maybe_unused]...

Andy Kaylor via All-commits all-commits at lists.llvm.org
Thu Jun 12 16:16:35 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 32e1360aaa9fbf5e388f9d061fa004b02c0a1359
      https://github.com/llvm/llvm-project/commit/32e1360aaa9fbf5e388f9d061fa004b02c0a1359
  Author: Andy Kaylor <akaylor at nvidia.com>
  Date:   2025-06-12 (Thu, 12 Jun 2025)

  Changed paths:
    M clang/lib/CIR/CodeGen/CIRGenValue.h

  Log Message:
  -----------
  [CIR][NFC] Fix build problems with [[maybe_unused]] (#143994)

A recent commit introduced the use of [[maybe_unused]] following
LLVM_PREFFERED_TYPE(bool) on a member variable declaration. I compiled
it with clang 14.0, which doesn't support the `preferred_type` attribute
so I didn't notice a problem. However, starting with clang 18.0, this
reports an error ("an attribute list cannot appear here") because of the
mixing of attribute styles.

This change fixes the problem by replacing [[maybe_unused]] with
LLVM_ATTRIBUTE_UNUSED.



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