================
@@ -2036,6 +2036,19 @@ def binary_operator(self) -> BinaryOperator:
 
         return BinaryOperator.from_id(self._binopcode)
 
+    @property
+    @cursor_null_guard
+    def unary_operator(self) -> UnaryOperator:
+        """
+        Retrieves the opcode if this cursor points to a unary operator
+        :return:
+        """
+
+        if not hasattr(self, "_binopcode"):
----------------
DeinAlptraum wrote:

It's not like these are expected to ever overlap, but this should be 
`_unopcode` or something similar

https://github.com/llvm/llvm-project/pull/219983
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to