Apply clang-tidy fixes for bugprone-macro-parentheses in Interop.h (NFC)
authorMehdi Amini <joker.eph@gmail.com>
Tue, 11 Jan 2022 20:21:37 +0000 (20:21 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Wed, 12 Jan 2022 20:21:47 +0000 (20:21 +0000)
mlir/include/mlir-c/Bindings/Python/Interop.h

index 7fcfd02..7efe850 100644 (file)
@@ -96,7 +96,8 @@
 /// Gets a void* from a wrapped struct. Needed because const cast is different
 /// 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