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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to