[Mlir-commits] [mlir] 731f4d9 - [MLIR] Apply clang-tidy fixes for misc-use-internal-linkage in TensorOps.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Sun Aug 31 02:24:58 PDT 2025


Author: Mehdi Amini
Date: 2025-08-31T02:14:18-07:00
New Revision: 731f4d904cea958423dccb9dc427278a98615994

URL: https://github.com/llvm/llvm-project/commit/731f4d904cea958423dccb9dc427278a98615994
DIFF: https://github.com/llvm/llvm-project/commit/731f4d904cea958423dccb9dc427278a98615994.diff

LOG: [MLIR] Apply clang-tidy fixes for misc-use-internal-linkage in TensorOps.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/Dialect/Tensor/IR/TensorOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp b/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
index 7d4b1127a08be..5105ce23465e7 100644
--- a/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
+++ b/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
@@ -3202,10 +3202,11 @@ void PadOp::getAsmResultNames(function_ref<void(Value, StringRef)> setNameFn) {
 
 // TODO: Replace custom<InferType> directive with AllTypesMatch as soon as it
 // supports optional types.
-void printInferType(OpAsmPrinter &printer, Operation *op, Value optOperand,
-                    Type typeToInfer, Type typeToInferFrom) {}
+static void printInferType(OpAsmPrinter &printer, Operation *op,
+                           Value optOperand, Type typeToInfer,
+                           Type typeToInferFrom) {}
 
-ParseResult
+static ParseResult
 parseInferType(OpAsmParser &parser,
                std::optional<OpAsmParser::UnresolvedOperand> optOperand,
                Type &typeToInfer, Type typeToInferFrom) {
@@ -4059,7 +4060,7 @@ OpFoldResult SplatOp::fold(FoldAdaptor adaptor) {
 //===----------------------------------------------------------------------===//
 // Common Canonicalizers and Folders.
 //===----------------------------------------------------------------------===//
-bool foldTensorCastPrecondition(DestinationStyleOpInterface op) {
+static bool foldTensorCastPrecondition(DestinationStyleOpInterface op) {
   // 1. InsertSliceOp has its own logic about folding tensor.cast ops.
   // 2. Exclude DPS ops that are also LoopLike from this interface as they
   // might need special handling of attached regions.


        


More information about the Mlir-commits mailing list