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

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Thu May 15 23:26:20 PDT 2025


================
@@ -0,0 +1,30 @@
+import os
+
+import clang.cindex
+
+if "CLANG_LIBRARY_PATH" in os.environ:
+    clang.cindex.Config.set_library_path(os.environ["CLANG_LIBRARY_PATH"])
+
+import unittest
+import ast
+
+
+class TestLib(unittest.TestCase):
+    def test_functions_registered(self):
+        def get_function_spelling(node):
+            # The call expressions we are interested in have their spelling in .attr, not .id
----------------
Endilll wrote:

It seems that darker is not run on tests, but we still shouldn't exceed 88 (?) columns without a good justification

https://github.com/llvm/llvm-project/pull/140015


More information about the cfe-commits mailing list