[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-29 Thread Jimmy Z via cfe-commits
jimmy-zx wrote: Ping. Can one of you press the merge button? https://github.com/llvm/llvm-project/pull/77269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-23 Thread Jimmy Z via cfe-commits
jimmy-zx wrote: Added flush before calling `writeMainFileToStdOut`. Personally I didn't find this function particularly useful: I was hoping to perform rewriting without creating new files, but seems like capturing stdout from a shared library requires some complex operation (`dup2` stuff). `

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-23 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx updated https://github.com/llvm/llvm-project/pull/77269 >From a5379ca876d9531d48b37b9ad9c864db98c7dcd6 Mon Sep 17 00:00:00 2001 From: Jimmy Z <51149050+jimmy...@users.noreply.github.com> Date: Mon, 8 Jan 2024 04:36:27 + Subject: [PATCH 1/5] [libclang/python] Expos

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-21 Thread Jimmy Z via cfe-commits
jimmy-zx wrote: @linux4life798 Thanks for pointing out! I've updated the naming to conform snake_case. https://github.com/llvm/llvm-project/pull/77269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-21 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx updated https://github.com/llvm/llvm-project/pull/77269 >From a5379ca876d9531d48b37b9ad9c864db98c7dcd6 Mon Sep 17 00:00:00 2001 From: Jimmy Z <51149050+jimmy...@users.noreply.github.com> Date: Mon, 8 Jan 2024 04:36:27 + Subject: [PATCH 1/4] [libclang/python] Expos

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-21 Thread Jimmy Z via cfe-commits
jimmy-zx wrote: Just updated the description a bit and I believe it's all set for merging. https://github.com/llvm/llvm-project/pull/77269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-21 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx edited https://github.com/llvm/llvm-project/pull/77269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-21 Thread Jimmy Z via cfe-commits
jimmy-zx wrote: Both tests are just invoking the functionalities of the rewriter on a sample code. I think additional tests for libclang does not provide extra coverage (as it is just the front-end). Thus I mirrored the tests back to the Python binding in 7a4ebf9c8c9ffa29d7f7f863d9a19bfe534323

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-20 Thread Jimmy Z via cfe-commits
jimmy-zx wrote: > Looks good overall. It's good that you wrote your own tests, but it would > also be nice to mirror tests in `clang/unittests/libclang/LibclangTest.cpp` > which test the same API. This way we can identify issues in binding layer > itself (when C++ tests pass, but Python tests

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-20 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx updated https://github.com/llvm/llvm-project/pull/77269 >From a5379ca876d9531d48b37b9ad9c864db98c7dcd6 Mon Sep 17 00:00:00 2001 From: Jimmy Z <51149050+jimmy...@users.noreply.github.com> Date: Mon, 8 Jan 2024 04:36:27 + Subject: [PATCH 1/3] [libclang/python] Expos

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-17 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx updated https://github.com/llvm/llvm-project/pull/77269 >From a5379ca876d9531d48b37b9ad9c864db98c7dcd6 Mon Sep 17 00:00:00 2001 From: Jimmy Z <51149050+jimmy...@users.noreply.github.com> Date: Mon, 8 Jan 2024 04:36:27 + Subject: [PATCH 1/2] [libclang/python] Expos

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-09 Thread Jimmy Z via cfe-commits
jimmy-zx wrote: Pinging @AaronBallman and @jyknight for review. (sorry if I chose the wrong people) https://github.com/llvm/llvm-project/pull/77269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-07 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx created https://github.com/llvm/llvm-project/pull/77269 Exposes `CXRewriter` API to the python binding as in https://github.com/llvm/llvm-project/commit/69e5abb57b70570cf04671a93246e5e624023650. >From a5379ca876d9531d48b37b9ad9c864db98c7dcd6 Mon Sep 17 00:00:00 2001

[clang] [libclang/python] Add cursorkinds 272-306 to the python binding (PR #77268)

2024-01-07 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx created https://github.com/llvm/llvm-project/pull/77268 Added cursorkinds 272-306 to the python binding as in `index.h`. Note: seems like `CursorKind.OMP_SCOPE_DIRECTIVE` is not in any of the group. I have changed the test cases to reflect that but I am not sure if

[clang] [libclang/python] Expose Rewriter to the libclang python binding. (PR #71341)

2024-01-07 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx closed https://github.com/llvm/llvm-project/pull/71341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Expose Rewriter to the libclang python binding. (PR #71341)

2023-11-05 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx updated https://github.com/llvm/llvm-project/pull/71341 >From 887751e365ca72515679f61d0734b1631ac38335 Mon Sep 17 00:00:00 2001 From: Jimmy Z <51149050+jimmy...@users.noreply.github.com> Date: Mon, 6 Nov 2023 00:25:39 + Subject: [PATCH 1/5] [libclang/python] Expos

[clang] [libclang/python] Expose Rewriter to the libclang python binding. (PR #71341)

2023-11-05 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx updated https://github.com/llvm/llvm-project/pull/71341 >From 887751e365ca72515679f61d0734b1631ac38335 Mon Sep 17 00:00:00 2001 From: Jimmy Z <51149050+jimmy...@users.noreply.github.com> Date: Mon, 6 Nov 2023 00:25:39 + Subject: [PATCH 1/4] [libclang/python] Expos

[clang] [libclang/python] Expose Rewriter to the libclang python binding. (PR #71341)

2023-11-05 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx updated https://github.com/llvm/llvm-project/pull/71341 >From 887751e365ca72515679f61d0734b1631ac38335 Mon Sep 17 00:00:00 2001 From: Jimmy Z <51149050+jimmy...@users.noreply.github.com> Date: Mon, 6 Nov 2023 00:25:39 + Subject: [PATCH 1/3] [libclang/python] Expos

[clang] [libclang/python] Expose Rewriter to the libclang python binding. (PR #71341)

2023-11-05 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx edited https://github.com/llvm/llvm-project/pull/71341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Expose Rewriter to the libclang python binding. (PR #71341)

2023-11-05 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx updated https://github.com/llvm/llvm-project/pull/71341 >From 887751e365ca72515679f61d0734b1631ac38335 Mon Sep 17 00:00:00 2001 From: Jimmy Z <51149050+jimmy...@users.noreply.github.com> Date: Mon, 6 Nov 2023 00:25:39 + Subject: [PATCH 1/2] [libclang/python] Expos

[clang] [libclang/python] Expose Rewriter to the libclang python binding. (PR #71341)

2023-11-05 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx created https://github.com/llvm/llvm-project/pull/71341 Exposes `CXRewriter` API in https://github.com/llvm/llvm-project/commit/69e5abb57b70570cf04671a93246e5e624023650. >From 887751e365ca72515679f61d0734b1631ac38335 Mon Sep 17 00:00:00 2001 From: Jimmy Z <51149050+