[Mlir-commits] [mlir] 3d63d1a - [MILR][NFC] Silence clang-tidy warning in AffineOps.cpp
Uday Bondhugula
llvmlistbot at llvm.org
Mon Aug 2 23:26:02 PDT 2021
Author: Uday Bondhugula
Date: 2021-08-03T11:54:28+05:30
New Revision: 3d63d1a390f8e7f04b6cea09f03dff5d34a3289b
URL: https://github.com/llvm/llvm-project/commit/3d63d1a390f8e7f04b6cea09f03dff5d34a3289b
DIFF: https://github.com/llvm/llvm-project/commit/3d63d1a390f8e7f04b6cea09f03dff5d34a3289b.diff
LOG: [MILR][NFC] Silence clang-tidy warning in AffineOps.cpp
Silence clang-tidy warning in AffineOps.cpp due to the inability to see
through the typeswitch. NFC.
Differential Revision: https://reviews.llvm.org/D106125
Added:
Modified:
mlir/lib/Dialect/Affine/IR/AffineOps.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
index 370084d116c6e..7a1e207822806 100644
--- a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
+++ b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
@@ -107,9 +107,12 @@ static bool remainsLegalAfterInline(OpTy op, Region *src, Region *dest,
/// 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(
More information about the Mlir-commits
mailing list