diff --git a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp --- a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp +++ b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp @@ -107,9 +107,12 @@ /// Checks if an affine apply operation remains legal after inlining from `src` /// to `dest`. +// Use "unused attribute" marker to silence clang-tidy warning stemming from +// the inability to see through "llvm::TypeSwitch". template <> -bool remainsLegalAfterInline(AffineApplyOp op, Region *src, Region *dest, - const BlockAndValueMapping &mapping) { +bool LLVM_ATTRIBUTE_UNUSED +remainsLegalAfterInline(AffineApplyOp op, Region *src, Region *dest, + const BlockAndValueMapping &mapping) { // If it's a valid dimension, we need to check that it remains so. if (isValidDim(op.getResult(), src)) return remainsLegalAfterInline(