[Mlir-commits] [mlir] 0986646 - [mlir] Replace LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]] (NFC) (#163917)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Oct 17 07:27:40 PDT 2025


Author: Kazu Hirata
Date: 2025-10-17T07:27:36-07:00
New Revision: 098664603e9695806235ed3ec8fa5b4afd8b4e77

URL: https://github.com/llvm/llvm-project/commit/098664603e9695806235ed3ec8fa5b4afd8b4e77
DIFF: https://github.com/llvm/llvm-project/commit/098664603e9695806235ed3ec8fa5b4afd8b4e77.diff

LOG: [mlir] Replace LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]] (NFC) (#163917)

This patch replaces LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]],
introduced as part of C++17.

Added: 
    

Modified: 
    mlir/unittests/Dialect/SparseTensor/MergerTest.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp b/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp
index 2a583059d2e0a..2b92e47d9288e 100644
--- a/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp
+++ b/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp
@@ -141,7 +141,7 @@ class MergerTestBase : public ::testing::TestWithParam<LevelFormat> {
   }
 
 #define IMPL_BINOP_EXPR(OP, KIND)                                              \
-  LLVM_ATTRIBUTE_UNUSED ExprId OP##Expr(ExprId e0, ExprId e1) {                \
+  [[maybe_unused]] ExprId OP##Expr(ExprId e0, ExprId e1) {                     \
     return merger.addExp(KIND, e0, e1);                                        \
   }
   FOREVERY_BINOP(IMPL_BINOP_EXPR)


        


More information about the Mlir-commits mailing list