[clang] [Docs] Explicitly document libclang ABI and API stability (PR #141657)

2025-05-27 Thread Jannick Kremer via cfe-commits
@@ -358,3 +358,46 @@ Complete example code .. _Index.h: https://github.com/llvm/llvm-project/blob/main/clang/include/clang-c/Index.h + +.. _Stability: + +ABI and API Stability +- + +The C interfaces in libclang are intended to be relatively stable. This a

[clang] [Docs] Explicitly document libclang ABI and API stability (PR #141657)

2025-05-27 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum approved this pull request. This looks reasonable to me, but I'm coming from the Python bindings anyway and can't comment on the details for the C/C++ side. https://github.com/llvm/llvm-project/pull/141657 ___ cfe-commi

[clang] [Docs] Explicitly document libclang ABI and API stability (PR #141657)

2025-05-27 Thread Jannick Kremer via cfe-commits
@@ -358,3 +358,46 @@ Complete example code .. _Index.h: https://github.com/llvm/llvm-project/blob/main/clang/include/clang-c/Index.h + +.. _Stability: + +ABI and API Stability +- + +The C interfaces in libclang are intended to be relatively stable. This a

[clang] [libclang/python] Ensure all library functions are registered (PR #140015)

2025-05-15 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/140015 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [libclang/python] Ensure all library functions are registered (PR #140015)

2025-05-15 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll This PR adds the missing functions to `FUNCTION_LIST`, as well as a test that checks for completeness, as discussed here: https://github.com/llvm/llvm-project/pull/138103#discussion_r2085977138 The test is unfortunately not 100% foolproof, since as noted `clang_get

[clang] [libclang/python] Ensure all library functions are registered (PR #140015)

2025-05-15 Thread Jannick Kremer via cfe-commits
@@ -0,0 +1,17 @@ +import os + +from clang.cindex import Config, conf, FUNCTION_LIST + +if "CLANG_LIBRARY_PATH" in os.environ: +Config.set_library_path(os.environ["CLANG_LIBRARY_PATH"]) + +import unittest + + +class TestIndex(unittest.TestCase): +def test_functions_register

[clang] [libclang/python] Ensure all library functions are registered (PR #140015)

2025-05-15 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/140015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Ensure all library functions are registered (PR #140015)

2025-05-15 Thread Jannick Kremer via cfe-commits
@@ -0,0 +1,17 @@ +import os + +from clang.cindex import Config, conf, FUNCTION_LIST + +if "CLANG_LIBRARY_PATH" in os.environ: +Config.set_library_path(os.environ["CLANG_LIBRARY_PATH"]) + +import unittest + + +class TestIndex(unittest.TestCase): +def test_functions_register

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-15 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/138103 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-15 Thread Jannick Kremer via cfe-commits
@@ -1552,68 +1563,83 @@ class Cursor(Structure): _fields_ = [("_kind_id", c_int), ("xdata", c_int), ("data", c_void_p * 3)] +_tu: TranslationUnit + @staticmethod -def from_location(tu, location): +def from_location(tu: TranslationUnit, location: SourceLoc

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-15 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/138103 >From 65ad7a888dafc9992793baee8a1ccc27f1b79fa5 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Thu, 1 May 2025 18:37:43 +0900 Subject: [PATCH 1/7] [libclang/python] Add typing annotations for the Cursor

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-15 Thread Jannick Kremer via cfe-commits
@@ -1552,68 +1553,85 @@ class Cursor(Structure): _fields_ = [("_kind_id", c_int), ("xdata", c_int), ("data", c_void_p * 3)] +_tu: TranslationUnit + +# This ensures that no operations are possible on null cursors +# by guarding all method calls with a not-null

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-15 Thread Jannick Kremer via cfe-commits
@@ -1545,6 +1545,16 @@ class ExceptionSpecificationKind(BaseEnumeration): ### Cursors ### +# This guard is used to ensure that no operations are possible on null cursors DeinAlptraum wrote: I added the docstring, but are you sure this makes sense on a decora

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-15 Thread Jannick Kremer via cfe-commits
@@ -1763,19 +1799,22 @@ def get_usr(self): another translation unit.""" return _CXString.from_result(conf.lib.clang_getCursorUSR(self)) -def get_included_file(self): +@cursor_null_guard +def get_included_file(self) -> File: """Returns the F

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-15 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: Adressed all review comments and added a release note for the breaking changes. https://github.com/llvm/llvm-project/pull/138103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-15 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/138103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Ensure all used library functions are registered (PR #140015)

2025-05-15 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/140015 >From c3c0adfe4a7dce3568a81594588be53d761b5980 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Thu, 15 May 2025 15:58:00 +0900 Subject: [PATCH 1/5] [libclang/python] Ensure all library functions are re

[clang] [libclang/python] Ensure all used library functions are registered (PR #140015)

2025-05-15 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/140015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Ensure all used library functions are registered (PR #140015)

2025-05-15 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/140015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Ensure all used library functions are registered (PR #140015)

2025-05-15 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/140015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Ensure all used library functions are registered (PR #140015)

2025-05-15 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Adapted the title and description. https://github.com/llvm/llvm-project/pull/140015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-16 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/138103 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-16 Thread Jannick Kremer via cfe-commits
@@ -77,6 +77,8 @@ Clang Frontend Potentially Breaking Changes Clang Python Bindings Potentially Breaking Changes -- +- Calling methods on null-cursors now leads to an exception. +- ``Cursor.from_location`` now returns ``None`` in

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-16 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/138103 >From 65ad7a888dafc9992793baee8a1ccc27f1b79fa5 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Thu, 1 May 2025 18:37:43 +0900 Subject: [PATCH 01/10] [libclang/python] Add typing annotations for the Curs

[clang] [libclang/python][NFC] Refactor wildcard import of `ctypes` (PR #140191)

2025-05-15 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum approved this pull request. Good idea! LGTM https://github.com/llvm/llvm-project/pull/140191 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Ensure all library functions are registered (PR #140015)

2025-05-15 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/140015 >From c3c0adfe4a7dce3568a81594588be53d761b5980 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Thu, 15 May 2025 15:58:00 +0900 Subject: [PATCH 1/4] [libclang/python] Ensure all library functions are re

[clang] [libclang/python] Ensure all library functions are registered (PR #140015)

2025-05-15 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/140015 Add a few library functions that were not previously registered to the `CDLL` object. The current behavior relies on the default `restype` to work. Add a test to check that all library functions are proper

[clang] [libclang/python] Ensure all used library functions are registered (PR #140015)

2025-05-16 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum closed https://github.com/llvm/llvm-project/pull/140015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-16 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum closed https://github.com/llvm/llvm-project/pull/138103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add a few things to the python api (PR #120590)

2025-05-16 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: I am closing this PR since all changes here have been implemented in other PRs: - Additions to the `File` interface: #130383 - Additions to the `Cursor` interface: #132377 - Type annotations: #138103 https://github.com/llvm/llvm-project/pull/120590 __

[clang] [libclang/python] Add a few things to the python api (PR #120590)

2025-05-16 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum closed https://github.com/llvm/llvm-project/pull/120590 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Properly report errors when test fails (PR #142371)

2025-06-02 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum closed https://github.com/llvm/llvm-project/pull/142371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Properly report errors when test fails (PR #142371)

2025-06-02 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: This issue has been raised in https://github.com/llvm/llvm-project/pull/142353#pullrequestreview-2887698305 https://github.com/llvm/llvm-project/pull/142371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [clang][python][test] Check if libclang.so is loadable (PR #142353)

2025-06-02 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: > Given the fact that OSError already contains the message that indicates the > problem, I think we should explore why it's not properly emitted in the first > place, before introducing bespoke ways of delivering error messages. > @DeinAlptraum any thoughts here? This has

[clang] [libclang/python] Properly report errors when test fails (PR #142371)

2025-06-02 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/142371 test_cdb.py's test_create_fail captures stderr to suppress output but did not release it in case the test fails. >From 4b16005e56a631c4459bca55fb396483eeea3ac6 Mon Sep 17 00:00:00 2001 From: Jannick Kremer

[clang] [clang][python][test] Check if libclang.so is loadable (PR #142353)

2025-06-02 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: > Besides, one could just change the wording of the warning message: trying to > load a 32-bit libclang.so into a 64-bit python is always an error, testsuite > or no. That's why you shouldn't return an exit code of 0 when this error occurs. Moreover, this seems like a worka

[clang] [llvm] Test 142948, please ignore (PR #144873)

2025-06-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/144873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Test 142948 (PR #144873)

2025-06-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/144873 >From e57e53c7e5abdb4c390a04b4ce9084dec9e71dd5 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 5 Jun 2025 13:40:26 +0200 Subject: [PATCH 1/4] [clang][python][test] Move python binding tests to lit fr

[clang] [llvm] Test 142948, please ignore (PR #144873)

2025-06-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum converted_to_draft https://github.com/llvm/llvm-project/pull/144873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #142948)

2025-06-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum requested changes to this pull request. I think I found the reason why the CI doesn't run. Unfortunately it made me realize that the changes here might require some deeper adaptions... So far the CI was a single-step workflow, that just calls the `llvm-project-t

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #142948)

2025-06-19 Thread Jannick Kremer via cfe-commits
@@ -33,7 +33,9 @@ jobs: python-version: ["3.8", "3.13"] uses: ./.github/workflows/llvm-project-tests.yml with: - build_target: check-clang-python + build_target: libclang + run: | +llvm-lit -v tools/clang/test --filter=bindings.sh

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #142948)

2025-06-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/142948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #142948)

2025-06-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/142948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #142948)

2025-06-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/142948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Test 142948 (PR #144873)

2025-06-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/144873 None >From e57e53c7e5abdb4c390a04b4ce9084dec9e71dd5 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 5 Jun 2025 13:40:26 +0200 Subject: [PATCH 1/3] [clang][python][test] Move python binding tests to l

[clang] [llvm] Test 142948 (PR #144873)

2025-06-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum converted_to_draft https://github.com/llvm/llvm-project/pull/144873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Test 142948 (PR #144873)

2025-06-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum ready_for_review https://github.com/llvm/llvm-project/pull/144873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Test 142948, please ignore (PR #144873)

2025-06-22 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/144873 >From e57e53c7e5abdb4c390a04b4ce9084dec9e71dd5 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 5 Jun 2025 13:40:26 +0200 Subject: [PATCH 1/6] [clang][python][test] Move python binding tests to lit fr

[clang] [llvm] Test 142948, please ignore (PR #144873)

2025-06-22 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum ready_for_review https://github.com/llvm/llvm-project/pull/144873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Test 142948, please ignore (PR #144873)

2025-06-22 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/144873 >From e57e53c7e5abdb4c390a04b4ce9084dec9e71dd5 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 5 Jun 2025 13:40:26 +0200 Subject: [PATCH 1/7] [clang][python][test] Move python binding tests to lit fr

[clang] [llvm] Test 142948, please ignore (PR #144873)

2025-06-22 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/144873 >From 704d36bdd22efd4645feaf8988e918ccfdf641a5 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 5 Jun 2025 13:40:26 +0200 Subject: [PATCH 1/2] [clang][python][test] Move python binding tests to lit fr

[clang] [llvm] Test 142948, please ignore (PR #144873)

2025-06-22 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/144873 >From 704d36bdd22efd4645feaf8988e918ccfdf641a5 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 5 Jun 2025 13:40:26 +0200 Subject: [PATCH 1/3] [clang][python][test] Move python binding tests to lit fr

[clang] [llvm] Test 142948, please ignore (PR #144873)

2025-06-22 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/144873 >From 704d36bdd22efd4645feaf8988e918ccfdf641a5 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 5 Jun 2025 13:40:26 +0200 Subject: [PATCH 1/5] [clang][python][test] Move python binding tests to lit fr

[clang] [llvm] Test 142948, please ignore (PR #144873)

2025-06-22 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/144873 >From e57e53c7e5abdb4c390a04b4ce9084dec9e71dd5 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 5 Jun 2025 13:40:26 +0200 Subject: [PATCH 1/6] [clang][python][test] Move python binding tests to lit fr

[clang] [llvm] Test 142948, please ignore (PR #144873)

2025-06-22 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/144873 >From e57e53c7e5abdb4c390a04b4ce9084dec9e71dd5 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 5 Jun 2025 13:40:26 +0200 Subject: [PATCH 1/5] [clang][python][test] Move python binding tests to lit fr

[clang] [llvm] Test 142948, please ignore (PR #144873)

2025-06-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/144873 >From 704d36bdd22efd4645feaf8988e918ccfdf641a5 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 5 Jun 2025 13:40:26 +0200 Subject: [PATCH 1/5] [clang][python][test] Move python binding tests to lit fr

[clang] [llvm] Test 142948, please ignore (PR #144873)

2025-06-22 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/144873 >From 704d36bdd22efd4645feaf8988e918ccfdf641a5 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 5 Jun 2025 13:40:26 +0200 Subject: [PATCH 1/4] [clang][python][test] Move python binding tests to lit fr

[clang] [llvm] Test 142948, please ignore (PR #144873)

2025-06-23 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/144873 >From 704d36bdd22efd4645feaf8988e918ccfdf641a5 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 5 Jun 2025 13:40:26 +0200 Subject: [PATCH 1/3] [clang][python][test] Move python binding tests to lit fr

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #142948)

2025-06-24 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: I've tested around a bit more and read up on the Github Actions docs, the takeaways are as follows 1. The reason that the libclang CI doesn't run is not that the file syntax is wrong (we'd still get a failed run complaining about syntax issues if that were the case). Rather

[clang] [llvm] Test 142948, please ignore (PR #144873)

2025-06-25 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum closed https://github.com/llvm/llvm-project/pull/144873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #142948)

2025-06-25 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: I agree, this might be the easier way. Sounds good to me. Could you resolve the conflict so we can also confirm that the CI runs as usual? https://github.com/llvm/llvm-project/pull/142948 ___ cfe-commits mailing list cfe-commits@lis

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #142948)

2025-06-25 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum approved this pull request. Great, LGTM! https://github.com/llvm/llvm-project/pull/142948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #142948)

2025-06-25 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/142948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Test 142948, please ignore (PR #144873)

2025-06-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/144873 >From 704d36bdd22efd4645feaf8988e918ccfdf641a5 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 5 Jun 2025 13:40:26 +0200 Subject: [PATCH 1/4] [clang][python][test] Move python binding tests to lit fr

[clang] [Docs] Explicitly document libclang ABI and API stability (PR #141657)

2025-06-05 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum approved this pull request. https://github.com/llvm/llvm-project/pull/141657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Added TypeKind.FLOAT16 for 32 in cindex.py (PR #142634)

2025-06-06 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Great, thank you! > IMHO: I guess a relevant test case is to take some huge relevant project, > maybe LLVM itself and parse all their files and walk through all the nodes of > the ast through all the members/methods recursively The problem is that this depends on the funct

[clang] [clang][python][test] Move python binding tests to lit framework (PR #142948)

2025-06-06 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: > I've got no explanation why your explicit raise didn't come through (but then > I known very little Python). Strange, I'll see if I can find out why, but as long as it works also for the expected failure case for you, that's good enough for me. > am at a bit of a loss ho

[clang] [clang][python][test] Check if libclang.so is loadable (PR #142353)

2025-06-03 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: I am unfortunately not at all familiar with how exactly the other tests are integrated and produce the outputs you described: > One problem with all these approaches, as I'd already mentioned, is that the > test outcome isn't properly reported, nor can one use the usual mach

[clang] Added TypeKind.FLOAT16 for 32 in cindex.py (PR #142634)

2025-06-04 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum approved this pull request. Thanks for the PR, LGTM I'll merge this once you've checked the private email setting as described in the bot comment. CC @Endilll : Seems like we're missing a bunch of `TypeKind`s, currently missing 33 - 39 and 179 - 181 enum variant

[clang] Added TypeKind.FLOAT16 for 32 in cindex.py (PR #142634)

2025-06-04 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: > Time to put libclang to use, and parse cindex.h? Probably, though I'll check if there are any more direct options first. I don't quite like the idea of hardcoding source file paths in the tests of a binding. https://github.com/llvm/llvm-project/pull/142634 ___

[clang] [libclang/python] Derive library function types from annotations (PR #142120)

2025-06-04 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/142120 >From 4669be22f731faf9ce0985aa634166c30c7025c6 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Fri, 30 May 2025 19:54:15 +0900 Subject: [PATCH] [libclang/python] Derive library function types from anno

[clang] [libclang/python] Properly report errors when test fails (PR #142371)

2025-06-02 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll I was too lazy to reproduce the exact issue (installing 32bit library and rebuilding Clang etc.) but I've forced this with a different error. The symptom (`EEE%` output on testing runs) is not specific to that one issue, but occurs whenever the `get_cindex_lib

[clang] [libclang/python] Derive library function types from annotations (PR #142120)

2025-05-30 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll this is an attempt at implementing what we've discussed previously: defining the library function signatures only in a single place in a way that serves both as type annotations for the library functions and registering the correct library function types on the lib

[clang] [libclang/python] Derive library function types from annotations (PR #142120)

2025-05-30 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/142120 This is a PoC for now >From 4669be22f731faf9ce0985aa634166c30c7025c6 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Fri, 30 May 2025 19:54:15 +0900 Subject: [PATCH] [libclang/python] Derive library fu

[clang] [libclang/python] Derive library function types from annotations (PR #142120)

2025-05-30 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Hmm so on the CI it fails for some reason... locally, the tests passed as usual without me having to change anything at all, except for the one test that checks used library functions. https://github.com/llvm/llvm-project/pull/142120

[clang] Added TypeKind.FLOAT16 for 32 in cindex.py (PR #142634)

2025-06-06 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum closed https://github.com/llvm/llvm-project/pull/142634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Derive library function types from annotations (PR #142120)

2025-06-06 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll I think I might not have been clear, the issue I am the most concerned about is the following. As an example, consider `clang_PrintingPolicy_getProperty`. Previously, it was defined in `FUNCTION_LIST` as ```python ("clang_PrintingPolicy_getProperty", [PrintingPolic

[clang] [libclang/python] Derive library function types from annotations (PR #142120)

2025-06-07 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Yup that summarizes it pretty well. So I don't see this having more than a very limited use, and for that it's not worth the various overheads and intransparencies it introduces. Shall I close this? https://github.com/llvm/llvm-project/pull/142120 __

[clang] [libclang/python] Add missing enum variants (PR #143264)

2025-06-07 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/143264 Add tests to ensure that all C-enum variants are defined on Python side. >From cee0067c7a0b35d2e1f15fd3fa698ec2afd6de88 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Sat, 7 Jun 2025 21:57:17 +0900 Su

[clang] [libclang/python] Add missing enum variants (PR #143264)

2025-06-07 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/143264 >From cee0067c7a0b35d2e1f15fd3fa698ec2afd6de88 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Sat, 7 Jun 2025 21:57:17 +0900 Subject: [PATCH 1/2] [libclang/python] Add missing enum variants Add tests

[clang] [libclang/python] Add missing enum variants (PR #143264)

2025-06-07 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll this adds the missing enum variants, and also adds a test using libclang, parsing `Index.h` for all our used enums to check for missing variants. You can see what this looks like in case of failure on the first CI run for this PR. This uses only the numeric enum v

[clang] [libclang/python] Add missing enum variants (PR #143264)

2025-06-07 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/143264 >From 71a404a5bbef81fa0aba48eb14671ed17ce4d8fb Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Sat, 7 Jun 2025 21:57:17 +0900 Subject: [PATCH 1/2] [libclang/python] Add missing enum variants Add tests

[clang] [clang][python][test] Move python binding tests to lit framework (PR #142948)

2025-06-05 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: Thank you for the PR, imo this is a much better approach than the previous one. As I mentioned before, I'm not familiar with the testing infrastructure, but insofar as it works, this looks good to me. Do note that the libclang CI should also be adapte

[clang] [libclang/python] Derive library function types from annotations (PR #142120)

2025-06-05 Thread Jannick Kremer via cfe-commits
@@ -3986,256 +3987,588 @@ def set_property(self, property, value): # Now comes the plumbing to hook up the C library. # Register callback types -translation_unit_includes_callback = CFUNCTYPE( +translation_unit_includes_callback: TypeAlias = CFUNCTYPE( # type: ignore [valid-

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #142948)

2025-06-12 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: LGTM now. I'd just like the libclang Python CI to run, but for some reason it doesn't seem to trigger... https://github.com/llvm/llvm-project/pull/142948 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #146844)

2025-07-03 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: We hit the > Invalid CXChildVisitResult! assert in `CIndex.cpp`, which is marked `llvm_unreachable()`... the function covers all three variants of the `CXChildVisitResult` enum. @Endilll I'm hitting supposedly unreachable code, only on this one platform apparently... if y

[clang] [llvm] Revert " Move python binding tests to lit framework (#146844)" (PR #146931)

2025-07-03 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum closed https://github.com/llvm/llvm-project/pull/146931 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Revert " Move python binding tests to lit framework (#146844)" (PR #146931)

2025-07-03 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/146931 This reverts commit 2532bde0388980ac7e299b02bc554e6fde6c686e. >From cd10ae347a4c640d5e74d25825966e51a63091c9 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Thu, 3 Jul 2025 19:30:05 +0200 Subject: [PAT

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #146844)

2025-07-03 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum closed https://github.com/llvm/llvm-project/pull/146844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #146844)

2025-07-03 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/146844 As discussed in PR #142353, the current testsuite of the `clang` Python bindings has several issues: - It `libclang.so` cannot be loaded into `python` to run the testsuite, the whole `ninja check-all` abo

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #146844)

2025-07-03 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Next attempt after #146486. The only change is, that I removed `s390x` from the `XFAIL` directive. https://github.com/llvm/llvm-project/pull/146844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #146486)

2025-07-02 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum closed https://github.com/llvm/llvm-project/pull/146486 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #145855)

2025-06-26 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum approved this pull request. Great! LGTM, just wait for the libclang CI to pass https://github.com/llvm/llvm-project/pull/145855 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #146486)

2025-07-01 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/146486 As discussed in PR #142353, the current testsuite of the `clang` Python bindings has several issues: - It `libclang.so` cannot be loaded into `python` to run the testsuite, the whole `ninja check-all` abo

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #146486)

2025-07-01 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: This is the next attempt at https://github.com/llvm/llvm-project/pull/145855. I've only replaced the `XFAIL: !native` with a `REQUIRES: native` as suggested here: https://github.com/llvm/llvm-project/pull/145855#issuecomment-3008770797 @dyung if you have any other feedback o

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #148802)

2025-07-15 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @ZequanWu thanks for the report! Reverted in #149012 for now https://github.com/llvm/llvm-project/pull/148802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #148802)

2025-07-15 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum closed https://github.com/llvm/llvm-project/pull/148802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #146844)

2025-07-08 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Thansk for the explainer! That gives me something to test, I will try a cross-compile with GCC and see if I can reproduce it locally. >It's not immediately obvious to me why the host compiler would make any >difference on this particular PR ... We are changing how the Clan

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #146844)

2025-07-08 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: It seems that the `clang-s390x-linux-multistage` and `clang-s390x-linux-lnt` builders use the exact same cmake settings, so only one of them failing seems quite strange... @uweigand can you tell me what the difference between these two is/do you have any idea what might cau

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #148802)

2025-07-15 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/148802 As discussed in PR #142353, the current testsuite of the `clang` Python bindings has several issues: - It `libclang.so` cannot be loaded into `python` to run the testsuite, the whole `ninja check-all` abo

<    1   2   3   4   5   6   >