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

Jannick Kremer via All-commits all-commits at lists.llvm.org
Mon Oct 20 02:55:40 PDT 2025


  Branch: refs/heads/release/21.x
  Home:   https://github.com/llvm/llvm-project
  Commit: ceeb93096c79db891174e1bccbd8daf5ee6c6b6a
      https://github.com/llvm/llvm-project/commit/ceeb93096c79db891174e1bccbd8daf5ee6c6b6a
  Author: Jannick Kremer <jannick.kremer at mailbox.org>
  Date:   2025-10-20 (Mon, 20 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