[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 updated https://github.com/llvm/llvm-project/pull/135773 >From 62dcfb1cb9bd0918bd471fddc1ffd849c2d604ac Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Tue, 15 Apr 2025 19:17:43 +0900 Subject: [PATCH 1/2] [libclang/C++] Fix clang_File_isEqual for in-memory fi

[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] 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-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] [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-13 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum approved this pull request. 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] [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
@@ -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 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
@@ -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
@@ -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
@@ -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] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-04-09 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] Fileequality bugfix (PR #133253)

2025-04-08 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/133253 >From e8bf3b6f08f0e0030ea36fe8c42fcde166ad27e3 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] Change all global variables to snake case (PR #132378)

2025-04-05 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/132378 None >From 926d2f7175fa7f04eae94291742ec7c89ea18516 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Fri, 21 Mar 2025 21:03:24 +0900 Subject: [PATCH] [libclang/python] Change all global variables to sna

[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] 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] 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] [libclang/python] Change all global variables to CAPS (PR #132930)

2025-03-25 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/132930 None >From f12efcc1c80f35f73934b90df7d4aaff8d2b0235 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Tue, 25 Mar 2025 21:58:31 +0900 Subject: [PATCH] [libclang/python] Change all global variables to CAP

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

2025-03-24 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] [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] [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 equality comparison operators for File (PR #130383)

2025-03-22 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: As for investigation: I wrote four tests in `test_file.py` that just assert all files as equal (the ones named `test_file_eq_failing...`) which is expected to fail, and all four of these tests fail for me locally. But in the CI, it seems that indeed all in-memory files seem

[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/8] [libclang/python] Add equality comparison operators fo

[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/7] [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/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 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] Change all global variables to snake case (PR #132378)

2025-03-21 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum closed https://github.com/llvm/llvm-project/pull/132378 ___ 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-21 Thread Jannick Kremer via cfe-commits
@@ -16,3 +17,16 @@ 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(kInputsDir, "hello.cpp") +header_path = os.

[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 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/4] [libclang/python] Add equality comparison operators fo

[clang] [libclang/python] Change all global variables to snake case (PR #132378)

2025-03-21 Thread Jannick Kremer via cfe-commits
@@ -10,7 +10,7 @@ import sys from pathlib import Path -kInputsDir = os.path.join(os.path.dirname(__file__), "INPUTS") +k_inputs_dir = os.path.join(os.path.dirname(__file__), "INPUTS") DeinAlptraum wrote: Sounds good. I've been wondering the entire time what t

[clang] [libclang/python] Change all global variables to snake case (PR #132378)

2025-03-21 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/132378 >From 926d2f7175fa7f04eae94291742ec7c89ea18516 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Fri, 21 Mar 2025 21:03:24 +0900 Subject: [PATCH 1/2] [libclang/python] Change all global variables to snake

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

2025-03-21 Thread Jannick Kremer via cfe-commits
@@ -1,12 +1,13 @@ import os -from clang.cindex import Config, File, Index +from clang.cindex import Config, File, Index, TranslationUnit if "CLANG_LIBRARY_PATH" in os.environ: Config.set_library_path(os.environ["CLANG_LIBRARY_PATH"]) import unittest +kInputsDir = o

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

2025-03-21 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/132377 Make Cursor hashable Add `Cursor.has_attr()` Add `Cursor.specialized_template` >From c433f194600d72a3902c4eed304439d6e3f2f62b Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Thu, 19 Dec 2024 16:22:04 +

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

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

[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 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] [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] [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 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] [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] [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] [cindex] Add API to query the class methods of a type (PR #123539)

2025-02-15 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll can you also review the non-Python part, or do you know someone who can? https://github.com/llvm/llvm-project/pull/123539 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

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

2025-02-06 Thread Jannick Kremer via cfe-commits
@@ -0,0 +1,36 @@ +[build-system] +requires = ["setuptools>=42", "setuptools_scm==8.1.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "clang" +description = "libclang python bindings" +readme = {file = "README.txt", content-type = "text/plain"} + +license = {text

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

2025-02-06 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: Sorry, saw this but had no time to answer. Unfortunately I'm also not familiar with Python packaging so can't be of much help here https://github.com/llvm/llvm-project/pull/125806 ___ cfe-commits mailing list

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

2025-02-06 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited 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] [cindex] Add API to query the class methods of a type (PR #123539)

2025-01-25 Thread Jannick Kremer via cfe-commits
@@ -2052,6 +2052,19 @@ def referenced(self): return self._referenced +@property +def specialized(self): +""" +For a cursor that is instantiated from a template, returns a cursor +representing the template that it was instantiated from.

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

2025-01-25 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: The Python part looks mostly good to me. I'm not too familiar with the non-Python side of things though, so would like someone else to take a look as well. @Endilll do you want to take a look? https://github.com/llvm/llvm-project/pull/123539 _

[clang] [libclang] Add API to query more information about base classes. (PR #120300)

2025-01-11 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum approved this pull request. Re Python: LGTM! On a sidenote just fyi, there's no need to amend & forcepush when you adress review comments. I know the contributor guide says something about how you should have only a single commit when submitting a patch, but tha

[clang] [libclang] Allow using PrintingPolicy with types (PR #122386)

2025-01-10 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum approved this pull request. Thanks for the PR! Please also add a corresponding release note for `Type.pretty_printed` in the Python bindings section. Otherwise, LGTM! https://github.com/llvm/llvm-project/pull/122386 ___

[clang] [libclang/python] Add python bindings for PrintingPolicy (PR #120494)

2025-01-06 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @efriedma-quic no idea, I would just rebase and hope that's it https://github.com/llvm/llvm-project/pull/120494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add python bindings for PrintingPolicy (PR #120494)

2024-12-20 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum approved this pull request. LGTM! @Endilll did you want to take a look at this as well? https://github.com/llvm/llvm-project/pull/120494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [libclang] Add API to query more information about base classes. (PR #120300)

2024-12-20 Thread Jannick Kremer via cfe-commits
@@ -2663,6 +2671,21 @@ def visitor(field, children): conf.lib.clang_Type_visitFields(self, fields_visit_callback(visitor), fields) return iter(fields) +def get_bases(self): +"""Return an iterator for accessing the base classes of this type.""" + +

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

2024-12-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited 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] Add a few things to the python api (PR #120590)

2024-12-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: Hi and thanks for the PR! To keep our history readable, please this up into smaller more focused PRs with an appropriate title ("Add a few things" won't be accepted ;)). This could be split into e.g. additions to the `File` interface, additions to the

[clang] [libclang] Add API to query more information about base classes. (PR #120300)

2024-12-19 Thread Jannick Kremer via cfe-commits
@@ -2663,6 +2671,21 @@ def visitor(field, children): conf.lib.clang_Type_visitFields(self, fields_visit_callback(visitor), fields) return iter(fields) +def get_bases(self): +"""Return an iterator for accessing the base classes of this type.""" + +

[clang] [libclang] Add API to query more information about base classes. (PR #120300)

2024-12-19 Thread Jannick Kremer via cfe-commits
@@ -2663,6 +2671,21 @@ def visitor(field, children): conf.lib.clang_Type_visitFields(self, fields_visit_callback(visitor), fields) return iter(fields) +def get_bases(self): +"""Return an iterator for accessing the base classes of this type.""" + +

[clang] [libclang] Add API to query more information about base classes. (PR #120300)

2024-12-19 Thread Jannick Kremer via cfe-commits
@@ -1,4 +1,5 @@ import os +import clang.cindex DeinAlptraum wrote: This import seems to be unused https://github.com/llvm/llvm-project/pull/120300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [libclang] Add API to query more information about base classes. (PR #120300)

2024-12-19 Thread Jannick Kremer via cfe-commits
@@ -437,6 +437,8 @@ LLVM_19 { LLVM_20 { global: clang_isBeforeInTranslationUnit; +clang_getOffsetOfBase; +clang_visitCXXBaseClasses; DeinAlptraum wrote: Not sure if this actually matters, but since all the other entries follow an alphabetic orde

[clang] [libclang] Add API to query more information about base classes. (PR #120300)

2024-12-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: I'm only familiar with the Python-side of the bindings, so only reviewed those. Minor comments, otherwise LGTM! https://github.com/llvm/llvm-project/pull/120300 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [libclang] Add API to query more information about base classes. (PR #120300)

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

[clang] [libclang/python] Add python bindings for PrintingPolicy (PR #120494)

2024-12-19 Thread Jannick Kremer via cfe-commits
@@ -981,3 +983,13 @@ def test_from_result_null(self): def test_from_cursor_result_null(self): tu = get_tu("") self.assertEqual(tu.cursor.semantic_parent, None) + +def test_pretty_print(self): +tu = get_tu("struct X { int x; }; void f(bool x) { }"

[clang] [libclang/python] Add python bindings for PrintingPolicy (PR #120494)

2024-12-19 Thread Jannick Kremer via cfe-commits
@@ -3685,6 +3695,71 @@ def write_main_file_to_stdout(self): conf.lib.clang_CXRewriter_writeMainFileToStdOut(self) +class PrintingPolicyProperty(BaseEnumeration): + +""" +A PrintingPolicyProperty identifies a property of a PrintingPolicy. +""" +Indentat

[clang] [libclang/python] Add python bindings for PrintingPolicy (PR #120494)

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

[clang] [libclang/python] Add python bindings for PrintingPolicy (PR #120494)

2024-12-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: Thanks for the PR! Two minor comments and formatting, otherwise LGTM! https://github.com/llvm/llvm-project/pull/120494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [libclang/python] Add python binding for clang_Cursor_isAnonymousRecordDecl (PR #120483)

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

[clang] [llvm] Expose format (attribute) info for function declarations in Clang Index API (PR #113754)

2024-12-18 Thread Jannick Kremer via cfe-commits
@@ -3109,6 +3109,29 @@ CINDEX_LINKAGE int clang_getFieldDeclBitWidth(CXCursor C); */ CINDEX_LINKAGE int clang_Cursor_getNumArguments(CXCursor C); +/** + * Retrieve FormatAttr on function declaration + */ +CINDEX_LINKAGE CXCursor clang_Cursor_getFormatAttr (CXCursor cur); -

[clang] [llvm] Expose format (attribute) info for function declarations in Clang Index API (PR #113754)

2024-12-18 Thread Jannick Kremer via cfe-commits
@@ -59,6 +59,10 @@ LLVM_13 { clang_Cursor_getMangling; clang_Cursor_getModule; clang_Cursor_getNumArguments; +clang_Cursor_getFormatAttr; +clang_FormatAttr_getType; +clang_FormatAttr_getFormatIdx; +clang_FormatAttr_getFirstArg; DeinA

[clang] [llvm] Expose format (attribute) info for function declarations in Clang Index API (PR #113754)

2024-12-18 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: I'm not that familiar with the C++ side of the bindings, so I would wait for approval from others. https://github.com/llvm/llvm-project/pull/113754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [llvm] Expose format (attribute) info for function declarations in Clang Index API (PR #113754)

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

[clang] [libclang/python] Clean up tests (PR #114383)

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

[clang] [libclang/python/tests] Clean up imports (PR #114409)

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

[clang] [libclang/python] Clean up tests (PR #114383)

2024-10-31 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Closing since this has been split into #114395, #114397, #114399, #114409 https://github.com/llvm/llvm-project/pull/114383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [libclang/python/tests] Clean up imports (PR #114409)

2024-10-31 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/114409 Sort imports using `isort`. Remove unused imports Collect multiple imports from the same module into a single import statement Unify import style >From a83338b9f4b306a81b55937e109e3065049fcfb7 Mon Sep 17 00

[clang] [libclang/python/tests] Clean up imports (PR #114409)

2024-10-31 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/114409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python/tests] Remove Python <3.6 workarounds (PR #114399)

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

[clang] [libclang/python/tests] Remove unused variables (PR #114397)

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

[clang] [libclang/python] Fix incorrect assert in test (PR #114395)

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

[clang] [libclang/python/tests] Remove Python <3.6 workarounds (PR #114399)

2024-10-31 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/114399 This removes workarounds for Python versions before 3.6, since our minimum Python version has been bumped to 3.8 >From b3079f7a44d65c8d62fe201b7c5766b852a1 Mon Sep 17 00:00:00 2001 From: Jannick Kremer

[clang] [libclang/python/tests] Remove unused variables (PR #114397)

2024-10-31 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/114397 Remove all occurrences of unused varialbes in the python bindings tests. Use `_` to ignore unused values in tuple unpacking expressions. >From 48e8bc646a7f73c1c0a762e8c1da7186f0ff2a5a Mon Sep 17 00:00:00 20

[clang] [libclang/python] Fix incorrect assert in test (PR #114395)

2024-10-31 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/114395 This mistake was introduced in #109846 >From 5de030fa89f4dbda6d21224a3097d83b467d1575 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Thu, 31 Oct 2024 13:07:06 +0100 Subject: [PATCH] [libclang/python]

[clang] [libclang/python] Clean up tests (PR #114383)

2024-10-31 Thread Jannick Kremer via cfe-commits
@@ -344,7 +343,7 @@ class Bar { ) self.assertEqual(len(copy_assignment_operators_cursors), 10) -self.assertTrue(len(non_copy_assignment_operators_cursors), 9) +self.assertEqual(len(non_copy_assignment_operators_cursors), 7) Dein

[clang] [libclang/python] Clean up tests (PR #114383)

2024-10-31 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/114383 Clean up imports via isort Remove unused imports Remove unused variables Remove Python <3.6 compatibility measures >From 25e10c362338265e07ec045b2b8bbe692ae18092 Mon Sep 17 00:00:00 2001 From: Jannick Kreme

[clang] [clang][python] Add CLANG_DISABLE_RUN_PYTHON_TESTS CMake option to disable clang python bindings tests (PR #111367)

2024-10-08 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum approved this pull request. LGTM, but I'd like @Endilll to take a look as well, since I'm not that familiar with our build infrastructure & cmake https://github.com/llvm/llvm-project/pull/111367 ___ cfe-commits mailing

[clang] [libclang/python] Do not rely on `ctypes`' `errcheck` (PR #105490)

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

[clang] [libclang/python] Do not rely on `ctypes`' `errcheck` (PR #105490)

2024-09-27 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll I rebased with the added tests from #109846 and checked with [diff-cover](https://pypi.org/project/diff-cover/) that all changed lines are covered by tests https://github.com/llvm/llvm-project/pull/105490 ___ cfe-commits

[clang] [libclang/python] Do not rely on `ctypes`' `errcheck` (PR #105490)

2024-09-27 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/105490 >From 2e4651345d1bde971be3a2c40602acf68f2c9519 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Wed, 21 Aug 2024 11:50:05 +0200 Subject: [PATCH] [libclang/python] Do not rely on ctypes' errcheck Call co

[clang] [libclang/python] Improve test coverage (PR #109846)

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

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
@@ -279,6 +280,90 @@ def test_is_default_method(self): self.assertTrue(xc.is_default_method()) self.assertFalse(yc.is_default_method()) +def test_is_deleted_method(self): +source = "class X { X() = delete; }; class Y { Y(); };" +tu = get_tu(

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   >