[clang] [libclang/C++] Fix clang_File_isEqual for in-memory files (PR #135773)

2025-04-22 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @AaronBallman ping/reminder for a review 🙇 https://github.com/llvm/llvm-project/pull/135773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add some logical typing changes. (PR #138074)

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

[clang] [libclang/python] Add some logical typing changes. (PR #138074)

2025-04-30 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/138074 This adds a few logical changes that might require some discussion to the libclang/python typing project, as the next step towards #76664 >From 4c90f65045c1fdabc1f91c746b1ecae04e14dd4e Mon Sep 17 00:00:00

[clang] [libclang/python] Add some logical typing changes. (PR #138074)

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

[clang] [libclang/python] Add some logical typing changes. (PR #138074)

2025-04-30 Thread Jannick Kremer via cfe-commits
@@ -314,6 +316,8 @@ def is_in_system_header(self): return conf.lib.clang_Location_isInSystemHeader(self) # type: ignore [no-any-return] def __eq__(self, other): +if not isinstance(other, SourceLocation): +return False DeinAlpt

[clang] [libclang/python] Add some logical typing changes. (PR #138074)

2025-04-30 Thread Jannick Kremer via cfe-commits
@@ -3466,6 +3479,8 @@ def get_tokens(self, locations=None, extent=None): """ if locations is not None: extent = SourceRange(start=locations[0], end=locations[1]) +if extent is None: +raise TypeError("get_tokens() requires at least

[clang] [libclang/python] Add some logical typing changes. (PR #138074)

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

[clang] [libclang/python] Add tests for equality operators. (PR #138132)

2025-05-01 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/138132 >From 74cf17d76918c465aa24e391e15546ab030483f2 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Thu, 1 May 2025 22:42:56 +0900 Subject: [PATCH 1/2] [libclang/python] Add tests for equality operators. Ad

[clang] [libclang/python] Add tests for equality operators. (PR #138132)

2025-05-01 Thread Jannick Kremer via cfe-commits
@@ -16,6 +16,8 @@ from .util import get_cursor, get_tu +INPUTS_DIR = os.path.join(os.path.dirname(__file__), "INPUTS") DeinAlptraum wrote: Yes, I changed these to use `pathlib.Path` instead https://github.com/llvm/llvm-project/pull/138132 __

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

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

[clang] [libclang/python] Add some logical typing changes. (PR #138074)

2025-05-01 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Which parts do you mean? The `__eq__` operators for other objects? https://github.com/llvm/llvm-project/pull/138074 ___ 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-01 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/138103 >From f47dfd697658600dd387162c908c43079da2774f Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Thu, 1 May 2025 18:37:43 +0900 Subject: [PATCH 1/2] [libclang/python] Add typing annotations for the Cursor

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

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

[clang] [libclang/python] Add some logical typing changes. (PR #138074)

2025-05-01 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/138074 >From 4c90f65045c1fdabc1f91c746b1ecae04e14dd4e Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Thu, 1 May 2025 10:42:33 +0900 Subject: [PATCH 1/2] [libclang/python] Add some logical typing changes. ---

[clang] [libclang/python] Add some logical typing changes. (PR #138074)

2025-05-01 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll thank you for the review, I've implemented your suggestions https://github.com/llvm/llvm-project/pull/138074 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [libclang/python] Add tests for equality operators. (PR #138132)

2025-05-01 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/138132 Adds tests for SourceRange, SourceLocation and Cursor. This is a follow-up to #138074 >From 74cf17d76918c465aa24e391e15546ab030483f2 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Thu, 1 May 2025 22:4

[clang] [libclang/python] Add tests for equality operators. (PR #138132)

2025-05-01 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll I added the tests as discussed on #138074 . I'm just not sure how/if we can reasonably test the `else` path for `briefComment`: this requires a libclang.so built before LLVM 3.2. In fact, I'm not entirely sure what the point here is: being able to use the same `lib

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

2025-05-01 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] Add some logical typing changes. (PR #138074)

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

[clang] [libclang/python] Remove compatibility workaround for briefComment (PR #138135)

2025-05-01 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/138135 None >From 257a5e923fee29df8c546b84875a64c43c994c04 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Thu, 1 May 2025 23:00:23 +0900 Subject: [PATCH] [libclang/python] Remove compatibility workaround for

[clang] [libclang/python] Remove compatibility workaround for briefComment (PR #138135)

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

[clang] [libclang/python] Add tests for equality operators. (PR #138132)

2025-05-01 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll Thank you, I put the removal of the compatibility stuff in a separate PR here: https://github.com/llvm/llvm-project/pull/138135 https://github.com/llvm/llvm-project/pull/138132 ___ cfe-commits mailing list cfe-commits@list

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

2025-05-01 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: When this is merged we can finally close #120590 Some other notes: https://github.com/llvm/llvm-project/pull/138103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

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

2025-05-01 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] Add typing annotations for the Cursor class (PR #138103)

2025-05-01 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] Add typing annotations for the Cursor class (PR #138103)

2025-05-01 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] Add typing annotations for the Cursor class (PR #138103)

2025-05-01 Thread Jannick Kremer via cfe-commits
@@ -1821,45 +1824,45 @@ def mangled_name(self): return self._mangled_name @property -def location(self): +def location(self) -> SourceLocation: """ Return the source location (the starting character) of the entity pointed at by th

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

2025-05-01 Thread Jannick Kremer via cfe-commits
@@ -1913,7 +1916,7 @@ def type(self): return self._type @property -def canonical(self): +def canonical(self) -> Cursor | None: """Return the canonical Cursor corresponding to this Cursor. DeinAlptraum wrote: This uses `Cursor.from

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-04-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/130383 >From 1e6ed0266fb849f14d6b952dcd84e277ed70aa58 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Thu, 19 Dec 2024 16:22:04 +0100 Subject: [PATCH 01/12] [libclang/python] Add equality comparison operators

[clang] [llvm] Prefer std::getenv to ::getenv (PR #108529)

2025-04-24 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Since there's been no update here for a while, can this be closed? @AaronBallman @vgvassilev https://github.com/llvm/llvm-project/pull/108529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

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

[clang] Remove duplicate API (PR #132776)

2025-04-24 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll if this fulfills your requested changes, can this be merged? https://github.com/llvm/llvm-project/pull/132776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)

2025-04-24 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @nightlark (ping) are you still looking into this? https://github.com/llvm/llvm-project/pull/125806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-04-23 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/130383 >From 1e6ed0266fb849f14d6b952dcd84e277ed70aa58 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Thu, 19 Dec 2024 16:22:04 +0100 Subject: [PATCH 01/10] [libclang/python] Add equality comparison operators

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-04-23 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/130383 >From 1e6ed0266fb849f14d6b952dcd84e277ed70aa58 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Thu, 19 Dec 2024 16:22:04 +0100 Subject: [PATCH 01/11] [libclang/python] Add equality comparison operators

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-04-23 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll having merged #135773 and rebased, the issues with file equality for in-memory files are resolved. I've reduced this to two tests now, that run on the except same C code except one of them uses on-disk files and the other one uses in-memory files. This replicates

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-04-15 Thread Jannick Kremer via cfe-commits
@@ -16,3 +17,76 @@ def test_file(self): self.assertEqual(str(file), "t.c") self.assertEqual(file.name, "t.c") self.assertEqual(repr(file), "") + +def test_file_eq(self): +path = os.path.join(inputs_dir, "hello.cpp") +header_path = os.

[clang] [cindex] Add support for calling getFullyQualifiedName to the Python binding. (PR #135420)

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

[clang] [libclang/C++] Fix clang_File_isEqual for in-memory files (PR #135773)

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

[clang] [cindex] Add support for calling getFullyQualifiedName to the Python binding. (PR #135420)

2025-04-15 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @epistax just realized you don't have perms to merge, right? If this is ready from your side, shall I merge? https://github.com/llvm/llvm-project/pull/135420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] Fileequality bugfix (PR #133253)

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

[clang] [cindex] Add support for calling getFullyQualifiedName to the Python binding. (PR #135420)

2025-04-12 Thread Jannick Kremer via cfe-commits
@@ -2593,6 +2593,19 @@ def get_canonical(self): """ return Type.from_result(conf.lib.clang_getCanonicalType(self), (self,)) +def get_fully_qualified_name(self, policy, with_global_ns_prefix=False): +""" +Get the fully qualified name for a ty

[clang] [cindex] Add support for calling getFullyQualifiedName to the Python binding. (PR #135420)

2025-04-12 Thread Jannick Kremer via cfe-commits
@@ -431,6 +431,7 @@ LLVM_19 { LLVM_20 { global: +clang_getFullyQualifiedName; DeinAlptraum wrote: Since LLVM 20 has been released, you need to open a new section here for LLVM 21 (which is where this change is going to be included in) https://github.c

[clang] [cindex] Add support for calling getFullyQualifiedName to the Python binding. (PR #135420)

2025-04-12 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: Re Python: A few minor nits, otherwise this looks good to me. @Endilll can you review the C++ side? https://github.com/llvm/llvm-project/pull/135420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [cindex] Add support for calling getFullyQualifiedName to the Python binding. (PR #135420)

2025-04-12 Thread Jannick Kremer via cfe-commits
@@ -643,6 +645,8 @@ Python Binding Changes the cursor is a specialization of. - Added ``Type.get_methods``, a binding for ``clang_visitCXXMethods``, which allows visiting the methods of a class. +- Added ``Type.getFullyQualifiedName``, which provides fully qualified type n

[clang] [cindex] Add support for calling getFullyQualifiedName to the Python binding. (PR #135420)

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

[clang] [cindex] Add support for calling getFullyQualifiedName to the Python binding. (PR #135420)

2025-04-12 Thread Jannick Kremer via cfe-commits
@@ -535,6 +535,28 @@ def test_pretty(self): pp.set_property(PrintingPolicyProperty.SuppressTagKeyword, False) self.assertEqual(f.type.get_canonical().pretty_printed(pp), "struct X") +def test_fully_qualified_name(self): +source = """ +namesp

[clang] [cindex] Add support for calling getFullyQualifiedName to the Python binding. (PR #135420)

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

[clang] [cindex] Add support for calling getFullyQualifiedName to the Python binding. (PR #135420)

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

[clang] [libclang/C++] Fix clang_File_isEqual for in-memory files (PR #135773)

2025-04-15 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/135773 Add tests for clang_File_isEqual (on-disk and in-memory) >From 62dcfb1cb9bd0918bd471fddc1ffd849c2d604ac Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Tue, 15 Apr 2025 19:17:43 +0900 Subject: [PATCH]

[clang] [cindex] Add support for calling getFullyQualifiedName to the Python binding. (PR #135420)

2025-04-15 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Done. Thank you for your contribution! https://github.com/llvm/llvm-project/pull/135420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add tests for equality operators. (PR #138132)

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

[clang] Remove duplicate API (PR #132776)

2025-05-01 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Jugst3r are you still looking at this? Otherwise, I would still suggest merging this. https://github.com/llvm/llvm-project/pull/132776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [libclang/python] Remove compatibility workaround for briefComment (PR #138135)

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

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-03-07 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll do you understand where this test failure might come from? It passes for me locally... https://github.com/llvm/llvm-project/pull/130383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

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

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-03-07 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/130383 This covers the `File` interface changes introduced added by #120590 >From 8a206611120c15010381e1570c2b4d7548142dbd Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Thu, 19 Dec 2024 16:22:04 +0100 Subje

[clang] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)

2025-02-28 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll @LecrisUT what else do you think needs to be done here to get this approved? https://github.com/llvm/llvm-project/pull/125806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

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

2025-03-01 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll since there hasn't been a reply in months, do you think it's appropriate to close this? https://github.com/llvm/llvm-project/pull/120590 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

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

2025-03-01 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Okay, thanks for the explanation & review :D I guess I might take this over if I have time then, which might be some time late in April (work is extremely busy) https://github.com/llvm/llvm-project/pull/120590 ___ cfe-commits mail

[clang] [cindex] Add API to query the class methods of a type (PR #123539)

2025-03-01 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Is this ready to be merged? @trelau https://github.com/llvm/llvm-project/pull/123539 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add some bindings to the `Cursor` interface (PR #132377)

2025-03-22 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/132377 >From c433f194600d72a3902c4eed304439d6e3f2f62b Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Thu, 19 Dec 2024 16:22:04 +0100 Subject: [PATCH 1/4] [libclang/python] Add some bindings to the Cursor int

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-03-22 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/130383 >From e8bf3b6f08f0e0030ea36fe8c42fcde166ad27e3 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Thu, 19 Dec 2024 16:22:04 +0100 Subject: [PATCH 1/6] [libclang/python] Add equality comparison operators fo

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-03-21 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/130383 >From e8bf3b6f08f0e0030ea36fe8c42fcde166ad27e3 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Thu, 19 Dec 2024 16:22:04 +0100 Subject: [PATCH 1/5] [libclang/python] Add equality comparison operators fo

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-03-21 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/130383 >From e8bf3b6f08f0e0030ea36fe8c42fcde166ad27e3 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Thu, 19 Dec 2024 16:22:04 +0100 Subject: [PATCH 1/6] [libclang/python] Add equality comparison operators fo

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-03-21 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/130383 >From e8bf3b6f08f0e0030ea36fe8c42fcde166ad27e3 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Thu, 19 Dec 2024 16:22:04 +0100 Subject: [PATCH 1/6] [libclang/python] Add equality comparison operators fo

[clang] [libclang/python] Add some bindings to the `Cursor` interface (PR #132377)

2025-03-22 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/132377 >From c433f194600d72a3902c4eed304439d6e3f2f62b Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Thu, 19 Dec 2024 16:22:04 +0100 Subject: [PATCH 1/3] [libclang/python] Add some bindings to the Cursor int

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-03-22 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/130383 >From e8bf3b6f08f0e0030ea36fe8c42fcde166ad27e3 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Thu, 19 Dec 2024 16:22:04 +0100 Subject: [PATCH 1/9] [libclang/python] Add equality comparison operators fo

[clang] [libclang/python] Add some bindings to the `Cursor` interface (PR #132377)

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

[clang] Remove duplicate API (PR #132776)

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

[clang] Remove duplicate API (PR #132776)

2025-03-27 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum approved this pull request. Oh wow, what an oversight. Thank you for this PR! Looks good to me for the most part, it just needs a release note (especially for the breaking change). I'd also like @Endilll to sign off on this as well https://github.com/llvm/llvm-pr

[clang] Remove duplicate API (PR #132776)

2025-03-27 Thread Jannick Kremer via cfe-commits
@@ -423,12 +423,6 @@ LLVM_17 { clang_getCursorUnaryOperatorKind; }; -LLVM_19 { - global: -clang_Cursor_getBinaryOpcode; -clang_Cursor_getBinaryOpcodeStr; -}; - DeinAlptraum wrote: I don't think we should touch sections of this file from older ver

[clang] Fileequality bugfix (PR #133253)

2025-03-27 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/133253 Test PR for now, waiting for CI results >From e8bf3b6f08f0e0030ea36fe8c42fcde166ad27e3 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Thu, 19 Dec 2024 16:22:04 +0100 Subject: [PATCH 1/9] [libclang/pyt

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

2025-05-12 Thread Jannick Kremer via cfe-commits
@@ -1913,7 +1916,7 @@ def type(self): return self._type @property -def canonical(self): +def canonical(self) -> Cursor | None: """Return the canonical Cursor corresponding to this Cursor. DeinAlptraum wrote: Okay, I did find a way

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

2025-05-12 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] Add typing annotations for the Cursor class (PR #138103)

2025-05-12 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-12 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-13 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-13 Thread Jannick Kremer via cfe-commits
@@ -1821,45 +1824,45 @@ def mangled_name(self): return self._mangled_name @property -def location(self): +def location(self) -> SourceLocation: """ Return the source location (the starting character) of the entity pointed at by th

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

2025-05-13 Thread Jannick Kremer via cfe-commits
@@ -1913,7 +1916,7 @@ def type(self): return self._type @property -def canonical(self): +def canonical(self) -> Cursor | None: """Return the canonical Cursor corresponding to this Cursor. DeinAlptraum wrote: That's a good idea, I

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

2025-05-14 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/5] [libclang/python] Add typing annotations for the Cursor

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

2025-05-14 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-14 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] Add typing annotations for the Type class (PR #140378)

2025-05-17 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/140378 This fully annotates the Type class, resolving 75 strict typing errors as the next step towards #76664 >From 6218826401a236e3f70073de9e07c3bdefe0b048 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Sa

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

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

[clang] [libclang/python] Simplify __eq__ operators (PR #140540)

2025-05-19 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: The `# type: ignore [no-any-return]` are added in cases where the return type cannot be inferred, usually the libclang library functions called on the `conf.lib` object, since they are added dynamically. By combining the library call with the `isinstance` check, even withou

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

2025-05-18 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll > Our error handling story is bad and inconsistent, but that's out of scope of > this PR What sort of improvements would you like to see? Also possibly related, reminder that #102410 is still open https://github.com/llvm/llvm-project/pull/140378

[clang] [libclang/python] Add `Cursor.from_translation_unit` (PR #140496)

2025-05-18 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum approved this pull request. LGTM, but are you sure there is a need for this API? This just seems like a slighly less convenient version of `TranslationUnit.cursor`. > This should complete the list of things Cursor can be made from. There is also a `cursor` prope

[clang] [libclang/python][NFC] Explain how null cursors are handled in docstring (PR #140499)

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

[clang] [libclang/python][NFC] Document how null cursors are handled (PR #140499)

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

[clang] [libclang/python] Add type annotations for code completion classes (PR #140539)

2025-05-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/140539 This fully annotates the code completion classes (CompletionChunk, CompletionString, CodeCompletionResult, CodeCompletionResults and CCRStructure) resolving 59 strict typing errors as the next step towards

[clang] [libclang/python] Add type annotations for code completion classes (PR #140539)

2025-05-19 Thread Jannick Kremer via cfe-commits
@@ -3051,6 +3053,7 @@ def isKindResultType(self): class CompletionString(ClangObject): class Availability: DeinAlptraum wrote: I did not annotate this class because it isn't used. I assume the `availability` property accessing `availabilityKinds` was sup

[clang] [libclang/python] Add type annotations for code completion classes (PR #140539)

2025-05-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/140539 >From 2d899491a409ede826674d7283df7f594987c355 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Mon, 19 May 2025 22:20:00 +0900 Subject: [PATCH 1/2] [libclang/python] Add type annotations for code compl

[clang] [libclang/python] Simplify __eq__ operators (PR #140540)

2025-05-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/140540 This allows us to remove a few type: ignores. >From 51df5f4eb979edb7cc761276fe846626641bd6b4 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Mon, 19 May 2025 22:36:05 +0900 Subject: [PATCH] [libclang/p

[clang] [libclang/python] Simplify __eq__ operators (PR #140540)

2025-05-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/140540 >From 51df5f4eb979edb7cc761276fe846626641bd6b4 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Mon, 19 May 2025 22:36:05 +0900 Subject: [PATCH 1/2] [libclang/python] Simplfy __eq__ operators This allows

[clang] [libclang/python] Simplify __eq__ operators (PR #140540)

2025-05-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/140540 >From 51df5f4eb979edb7cc761276fe846626641bd6b4 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Mon, 19 May 2025 22:36:05 +0900 Subject: [PATCH 1/3] [libclang/python] Simplfy __eq__ operators This allows

[clang] [libclang/python] Simplify __eq__ operators (PR #140540)

2025-05-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/140540 >From 51df5f4eb979edb7cc761276fe846626641bd6b4 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Mon, 19 May 2025 22:36:05 +0900 Subject: [PATCH 1/4] [libclang/python] Simplfy __eq__ operators This allows

[clang] [libclang/python] Simplify __eq__ operators (PR #140540)

2025-05-19 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll I don't see the `__ne__` operator being addded in the diff If you are referring to the "Fix formatting again, again" commit, that just readds the operator after accidentally removing it in the "Fix formatting" commit (I had some issues with my editor yesterday) htt

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

2025-05-27 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited 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] [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

<    1   2   3   4   5   6   >