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
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
@@ -0,0 +1 @@
+1, 2, 3
Endilll wrote:
Lack of newline at the end of the file doesn't seem to be an important part of
the test. You should add it to both `a.inc` and `b.inc`
https://github.com/llvm/llvm-project/pull/130383
___
https://github.com/Endilll approved this pull request.
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
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
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
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
@@ -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.
@@ -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.
@@ -444,6 +444,7 @@ Python Binding Changes
--
- Added ``Type.get_methods``, a binding for ``clang_visitCXXMethods``, which
allows visiting the methods of a class.
+- Add equality comparison operators for ``File`` type
Endilll wrote:
```su
@@ -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.
@@ -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.
AaronBallman wrote:
> @AaronBallman do you have a clue why equality comparison for in-memory files
> works differently compared to on-disk files?
Are they? I think you're supposed to use `FileSystem::equivalent()` to test for
it which uses an underlying unique ID.
https://github.com/llvm/llv
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
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
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
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff a27da0a20cbfb9f0c600d53bf2520f068b222f59
262f6602c76de472ddcacfe1d13069f777aaec73 --e
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
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
@@ -16,3 +17,30 @@ 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.
@@ -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.
https://github.com/Endilll 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
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
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
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
https://github.com/Endilll commented:
@AaronBallman do you have a clue why equality comparison for in-memory files
works differently compared to on-disk files?
https://github.com/llvm/llvm-project/pull/130383
___
cfe-commits mailing list
cfe-commits@l
@@ -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.
@@ -16,3 +17,30 @@ 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.
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
@@ -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
https://github.com/Endilll 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
@@ -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
@@ -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.
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
Endilll wrote:
I think the failure in question is
```
==
FAIL: test_file_eq (tests.cindex.test_file.TestFile.test_file_eq)
--
Traceback (most recent call last):
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
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
github-actions[bot] wrote:
:warning: Python code formatter, darker found issues in your code. :warning:
You can test this locally with the following command:
``bash
darker --check --diff -r
e22579a6752801a5d3ced59c7a2e2499d547c657...8a206611120c15010381e1570c2b4d7548142dbd
clang
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Jannick Kremer (DeinAlptraum)
Changes
This covers the `File` interface changes added by #120590
---
Full diff: https://github.com/llvm/llvm-project/pull/130383.diff
3 Files Affected:
- (modified) clang/bindings/python/clang/cindex.py (+
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
40 matches
Mail list logo