[clang] [libclang/python] Ensure all library functions are registered (PR #140015)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Thu May 15 21:37:53 PDT 2025
================
@@ -0,0 +1,17 @@
+import os
+
+from clang.cindex import Config, conf, FUNCTION_LIST
+
+if "CLANG_LIBRARY_PATH" in os.environ:
+ Config.set_library_path(os.environ["CLANG_LIBRARY_PATH"])
+
+import unittest
+
+
+class TestIndex(unittest.TestCase):
+ def test_functions_registered(self):
+ IGNORED = set(["_FuncPtr", "_name", "_handle"])
+ lib_functions = set(vars(conf.lib).keys())
----------------
Endilll wrote:
I see what you wanted to do. I think it's a good middle ground to prevent scope creep for this PR. I still think there's value in `FUNCTION_LIST` providing a complete low-level interface to libclang for users that wish to do so, but it can be its own PR.
https://github.com/llvm/llvm-project/pull/140015
More information about the cfe-commits
mailing list