[all-commits] [llvm/llvm-project] 358513: [llvm] Replace LLVM_ATTRIBUTE_UNUSED with [[maybe_...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Tue Oct 14 07:16:07 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 358513f662773754ce567891b8b9a60f1ae29ae0
      https://github.com/llvm/llvm-project/commit/358513f662773754ce567891b8b9a60f1ae29ae0
  Author: Kazu Hirata <kazu at google.com>
  Date:   2025-10-14 (Tue, 14 Oct 2025)

  Changed paths:
    M llvm/include/llvm/CodeGen/LiveIntervals.h
    M llvm/lib/Analysis/MemorySSA.cpp
    M llvm/lib/CodeGen/AtomicExpandPass.cpp
    M llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
    M llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
    M llvm/lib/Support/TextEncoding.cpp
    M llvm/lib/Support/UnicodeNameToCodepoint.cpp
    M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
    M llvm/lib/Target/CSKY/Disassembler/CSKYDisassembler.cpp
    M llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp
    M llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp
    M llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp
    M llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
    M llvm/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp
    M llvm/lib/Target/Hexagon/MCTargetDesc/HexagonBaseInfo.h
    M llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/unittests/ADT/TypeTraitsTest.cpp

  Log Message:
  -----------
  [llvm] Replace LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]] (NFC) (#163330)

This patch replaces LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]] where
we do not need to move the position of [[maybe_unused]] within
declarations.

Notes:

- [[maybe_unused]] is a standard feature of C++17.

- The compiler is far more lenient about the placement of
  __attribute__((unused)) than that of [[maybe_unused]].

I'll follow up with another patch to finish up the rest.



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