Index: bindings/python/clang/cindex.py =================================================================== --- bindings/python/clang/cindex.py +++ bindings/python/clang/cindex.py @@ -3007,6 +3007,9 @@ Type, Type.from_result), + ("clang_getClangVersion", + [], _CXString), + ("clang_getCompletionAvailability", [c_void_p], c_int), @@ -3625,6 +3628,16 @@ return True + @property + def version_string(self): + """Return a version string, suitable for showing to a user + + The version string is not intended to be parsed, and the format is not + guaranteed to be stable. + """ + version = self.lib.clang_getClangVersion() + return version.spelling + def register_enumerations(): for name, value in clang.enumerations.TokenKinds: TokenKind.register(value, name)