[Mlir-commits] [mlir] 8a7fa1e - [MLIR] Apply clang-tidy fixes for performance-move-const-arg in Location.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Mon Sep 1 02:18:41 PDT 2025


Author: Mehdi Amini
Date: 2025-09-01T02:17:00-07:00
New Revision: 8a7fa1e03512228642f23e8b97067945f237220b

URL: https://github.com/llvm/llvm-project/commit/8a7fa1e03512228642f23e8b97067945f237220b
DIFF: https://github.com/llvm/llvm-project/commit/8a7fa1e03512228642f23e8b97067945f237220b.diff

LOG: [MLIR] Apply clang-tidy fixes for performance-move-const-arg in Location.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/IR/Location.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/IR/Location.cpp b/mlir/lib/IR/Location.cpp
index 23e70c6449feb..662681e19d26a 100644
--- a/mlir/lib/IR/Location.cpp
+++ b/mlir/lib/IR/Location.cpp
@@ -52,8 +52,8 @@ struct FileLineColRangeAttrStorage final
         FileLineColRangeAttrStorage::totalSizeToAlloc<unsigned>(locEnc - 1);
     auto *rawMem =
         allocator.allocate(byteSize, alignof(FileLineColRangeAttrStorage));
-    auto *result = ::new (rawMem) FileLineColRangeAttrStorage(
-        std::move(std::get<0>(tblgenKey)), locEnc - 1);
+    auto *result = ::new (rawMem)
+        FileLineColRangeAttrStorage(std::get<0>(tblgenKey), locEnc - 1);
     if (numInArray > 0) {
       ArrayRef<unsigned> elements = std::get<1>(tblgenKey);
       result->startLine = elements[0];


        


More information about the Mlir-commits mailing list