Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions clang/bindings/python/clang/cindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -3970,6 +3970,7 @@ def set_property(self, property, value):
("clang_getCursorAvailability", [Cursor], c_int),
("clang_getCursorDefinition", [Cursor], Cursor),
("clang_getCursorDisplayName", [Cursor], _CXString),
("clang_getCursorExceptionSpecificationType", [Cursor], c_int),
("clang_getCursorExtent", [Cursor], SourceRange),
("clang_getCursorLexicalParent", [Cursor], Cursor),
("clang_getCursorLocation", [Cursor], SourceLocation),
Expand All @@ -3980,6 +3981,7 @@ def set_property(self, property, value):
("clang_getCursorResultType", [Cursor], Type),
("clang_getCursorSemanticParent", [Cursor], Cursor),
("clang_getCursorSpelling", [Cursor], _CXString),
("clang_getCursorTLSKind", [Cursor], c_int),
("clang_getCursorType", [Cursor], Type),
("clang_getCursorUSR", [Cursor], _CXString),
("clang_Cursor_getMangling", [Cursor], _CXString),
Expand All @@ -4005,6 +4007,7 @@ def set_property(self, property, value):
("clang_getEnumConstantDeclUnsignedValue", [Cursor], c_ulonglong),
("clang_getEnumConstantDeclValue", [Cursor], c_longlong),
("clang_getEnumDeclIntegerType", [Cursor], Type),
("clang_getExceptionSpecificationType", [Type], c_int),
("clang_getFile", [TranslationUnit, c_interop_string], c_object_p),
("clang_getFileName", [File], _CXString),
("clang_getFileTime", [File], c_uint),
Expand Down Expand Up @@ -4101,6 +4104,7 @@ def set_property(self, property, value):
("clang_Cursor_getBriefCommentText", [Cursor], _CXString),
("clang_Cursor_getRawCommentText", [Cursor], _CXString),
("clang_Cursor_getOffsetOfField", [Cursor], c_longlong),
("clang_Cursor_getStorageClass", [Cursor], c_int),
("clang_Cursor_isAnonymous", [Cursor], bool),
("clang_Cursor_isAnonymousRecordDecl", [Cursor], bool),
("clang_Cursor_isBitField", [Cursor], bool),
Expand Down
17 changes: 17 additions & 0 deletions clang/bindings/python/tests/cindex/test_lib.py
Original file line number Diff line number Diff line change
@@ -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())
registered_functions = set([item[0] for item in FUNCTION_LIST])
unregistered_functions = lib_functions - registered_functions - IGNORED
self.assertEqual(unregistered_functions, set())