https://github.com/Endilll created 
https://github.com/llvm/llvm-project/pull/140499

Now that we looked at this aspect closely and fixed things, I think we can 
document this.

>From 445eacab8a326d3abcca95a31f07c272d0d155e7 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov <serebrennikov.vladis...@gmail.com>
Date: Mon, 19 May 2025 09:24:36 +0300
Subject: [PATCH] [libclang/python][NFC] Explain how null cursors are handled
 in documentation

---
 clang/bindings/python/clang/cindex.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/clang/bindings/python/clang/cindex.py 
b/clang/bindings/python/clang/cindex.py
index f65bcad780a70..82a6197bf61af 100644
--- a/clang/bindings/python/clang/cindex.py
+++ b/clang/bindings/python/clang/cindex.py
@@ -1585,6 +1585,8 @@ class Cursor(Structure):
     """
     The Cursor class represents a reference to an element within the AST. It
     acts as a kind of iterator.
+
+    Methods of this class return null cursors as None.
     """
 
     _fields_ = [("_kind_id", c_int), ("xdata", c_int), ("data", c_void_p * 3)]

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to