Skip to content

Commit

Permalink
[MILR][NFC] Silence clang-tidy warning in AffineOps.cpp
Browse files Browse the repository at this point in the history
Silence clang-tidy warning in AffineOps.cpp due to the inability to see
through the typeswitch. NFC.

Differential Revision: https://reviews.llvm.org/D106125
  • Loading branch information
bondhugula committed Aug 3, 2021
1 parent 77ebfba commit 3d63d1a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mlir/lib/Dialect/Affine/IR/AffineOps.cpp
Expand Up @@ -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(
Expand Down

0 comments on commit 3d63d1a

Please sign in to comment.