[all-commits] [llvm/llvm-project] 38a528: [libclang/python] Return None instead of null curs...

Jannick Kremer via All-commits all-commits at lists.llvm.org
Mon Oct 13 06:57:16 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 38a52828fa60f007f936f2ba752016553a7a550b
      https://github.com/llvm/llvm-project/commit/38a52828fa60f007f936f2ba752016553a7a550b
  Author: Jannick Kremer <jannick.kremer at mailbox.org>
  Date:   2025-10-13 (Mon, 13 Oct 2025)

  Changed paths:
    M clang/bindings/python/clang/cindex.py
    M clang/bindings/python/tests/cindex/test_tokens.py
    M clang/docs/ReleaseNotes.rst

  Log Message:
  -----------
  [libclang/python] Return None instead of null cursors from Token.cursor (#163183)

Since https://github.com/llvm/llvm-project/pull/138103 , the `Cursor`
class throws an error when any of its methods is called on a null
cursor. Simultaneously, we adapted all methods to return `None` instead
of a null cursor, so users should not encounter these. We have
overlooked one way to end up with null cursors, namely the
`Token.cursor` property, which may return null cursors under some
circumstances.

Fixes #163180



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list