[Mlir-commits] [mlir] 44bdcb8 - Apply clang-tidy fixes for bugprone-macro-parentheses in Interop.h (NFC)

Mehdi Amini llvmlistbot at llvm.org
Wed Jan 12 12:24:40 PST 2022


Author: Mehdi Amini
Date: 2022-01-12T20:21:47Z
New Revision: 44bdcb889a1449a070b80b41cc7e8c72723ea1fd

URL: https://github.com/llvm/llvm-project/commit/44bdcb889a1449a070b80b41cc7e8c72723ea1fd
DIFF: https://github.com/llvm/llvm-project/commit/44bdcb889a1449a070b80b41cc7e8c72723ea1fd.diff

LOG: Apply clang-tidy fixes for bugprone-macro-parentheses in Interop.h (NFC)

Added: 
    

Modified: 
    mlir/include/mlir-c/Bindings/Python/Interop.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir-c/Bindings/Python/Interop.h b/mlir/include/mlir-c/Bindings/Python/Interop.h
index 7fcfd028b407d..7efe8500af71d 100644
--- a/mlir/include/mlir-c/Bindings/Python/Interop.h
+++ b/mlir/include/mlir-c/Bindings/Python/Interop.h
@@ -96,7 +96,8 @@
 /// Gets a void* from a wrapped struct. Needed because const cast is 
diff erent
 /// between C/C++.
 #ifdef __cplusplus
-#define MLIR_PYTHON_GET_WRAPPED_POINTER(object) const_cast<void *>(object.ptr)
+#define MLIR_PYTHON_GET_WRAPPED_POINTER(object)                                \
+  (const_cast<void *>((object).ptr))
 #else
 #define MLIR_PYTHON_GET_WRAPPED_POINTER(object) (void *)(object.ptr)
 #endif


        


More information about the Mlir-commits mailing list