Skip to content

Commit feda31e

Browse files
authored
[libclang/python] Remove compatibility workaround for briefComment (#138135)
Remove a workaround that made cindex.py from LLVM 3.2 work with older libclang.so versions
1 parent 9b6b144 commit feda31e

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

clang/bindings/python/clang/cindex.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2980,11 +2980,7 @@ def availability(self):
29802980

29812981
@property
29822982
def briefComment(self):
2983-
if conf.function_exists("clang_getCompletionBriefComment"):
2984-
return _CXString.from_result(
2985-
conf.lib.clang_getCompletionBriefComment(self.obj)
2986-
)
2987-
return ""
2983+
return _CXString.from_result(conf.lib.clang_getCompletionBriefComment(self.obj))
29882984

29892985
def __repr__(self):
29902986
return (
@@ -4264,14 +4260,6 @@ def get_cindex_library(self) -> CDLL:
42644260

42654261
return library
42664262

4267-
def function_exists(self, name: str) -> bool:
4268-
try:
4269-
getattr(self.lib, name)
4270-
except AttributeError:
4271-
return False
4272-
4273-
return True
4274-
42754263

42764264
conf = Config()
42774265

0 commit comments

Comments
 (0)