[clang] [libclang/python] Remove compatibility workaround for briefComment (PR #138135)
via cfe-commits
cfe-commits at lists.llvm.org
Thu May 1 07:01:38 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Jannick Kremer (DeinAlptraum)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/138135.diff
1 Files Affected:
- (modified) clang/bindings/python/clang/cindex.py (+1-13)
``````````diff
diff --git a/clang/bindings/python/clang/cindex.py b/clang/bindings/python/clang/cindex.py
index e4a731b1d57fa..2b0a1db04821e 100644
--- a/clang/bindings/python/clang/cindex.py
+++ b/clang/bindings/python/clang/cindex.py
@@ -2980,11 +2980,7 @@ def availability(self):
@property
def briefComment(self):
- if conf.function_exists("clang_getCompletionBriefComment"):
- return _CXString.from_result(
- conf.lib.clang_getCompletionBriefComment(self.obj)
- )
- return ""
+ return _CXString.from_result(conf.lib.clang_getCompletionBriefComment(self.obj))
def __repr__(self):
return (
@@ -4264,14 +4260,6 @@ def get_cindex_library(self) -> CDLL:
return library
- def function_exists(self, name: str) -> bool:
- try:
- getattr(self.lib, name)
- except AttributeError:
- return False
-
- return True
-
conf = Config()
``````````
</details>
https://github.com/llvm/llvm-project/pull/138135
More information about the cfe-commits
mailing list