[Mlir-commits] [mlir] 393c6db - Apply clang-tidy fixes for bugprone-macro-parentheses to MLIR (NFC)

Mehdi Amini llvmlistbot at llvm.org
Mon Mar 7 02:42:00 PST 2022


Author: Mehdi Amini
Date: 2022-03-07T10:41:44Z
New Revision: 393c6db7a173836b4ee350ad5598ed67b8fb14b9

URL: https://github.com/llvm/llvm-project/commit/393c6db7a173836b4ee350ad5598ed67b8fb14b9
DIFF: https://github.com/llvm/llvm-project/commit/393c6db7a173836b4ee350ad5598ed67b8fb14b9.diff

LOG: Apply clang-tidy fixes for bugprone-macro-parentheses to MLIR (NFC)

Added: 
    

Modified: 
    mlir/lib/ExecutionEngine/SparseTensorUtils.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp b/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
index 3f9a80947938e..ca1922a21e42f 100644
--- a/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
+++ b/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
@@ -914,7 +914,7 @@ extern "C" {
     assert(tensor &&iref &&vref);                                              \
     assert(iref->strides[0] == 1);                                             \
     index_type *indx = iref->data + iref->offset;                              \
-    V *value = vref->data + vref->offset;                                      \
+    (V) *value = vref->data + vref->offset;                                    \
     const uint64_t isize = iref->sizes[0];                                     \
     auto iter = static_cast<SparseTensorCOO<V> *>(tensor);                     \
     const Element<V> *elem = iter->getNext();                                  \
@@ -950,7 +950,7 @@ extern "C" {
     assert(aref->strides[0] == 1);                                             \
     assert(vref->sizes[0] == fref->sizes[0]);                                  \
     index_type *cursor = cref->data + cref->offset;                            \
-    V *values = vref->data + vref->offset;                                     \
+    (V) *values = vref->data + vref->offset;                                   \
     bool *filled = fref->data + fref->offset;                                  \
     index_type *added = aref->data + aref->offset;                             \
     static_cast<SparseTensorStorageBase *>(tensor)->expInsert(                 \


        


More information about the Mlir-commits mailing list