[all-commits] [llvm/llvm-project] c5b611: [libclang/python] Expose `clang_isBeforeInTranslat...

Jannick Kremer via All-commits all-commits at lists.llvm.org
Thu Aug 15 15:33:19 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c5b611a419ca8acab041ca52a94c6338bdcd1756
      https://github.com/llvm/llvm-project/commit/c5b611a419ca8acab041ca52a94c6338bdcd1756
  Author: Jannick Kremer <jannick.kremer at mailbox.org>
  Date:   2024-08-16 (Fri, 16 Aug 2024)

  Changed paths:
    M clang/bindings/python/clang/cindex.py
    M clang/bindings/python/tests/cindex/test_location.py
    A clang/bindings/python/tests/cindex/test_source_range.py
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang-c/CXSourceLocation.h
    M clang/lib/Basic/SourceManager.cpp
    M clang/tools/libclang/CXSourceLocation.cpp
    M clang/tools/libclang/libclang.map

  Log Message:
  -----------
  [libclang/python] Expose `clang_isBeforeInTranslationUnit` for `SourceRange.__contains__`

Add libclang function `clang_isBeforeInTranslationUnit` to allow checking the order between two source locations.
Simplify the `SourceRange.__contains__` implementation using this new function.
Add tests for `SourceRange.__contains__` and the newly added functionality.

Fixes #22617 
Fixes #52827



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