Author: Jannick Kremer
Date: 2025-05-02T03:23:04+02:00
New Revision: feda31e0483c47cbef549c068aab1c60e7d10572

URL: 
https://github.com/llvm/llvm-project/commit/feda31e0483c47cbef549c068aab1c60e7d10572
DIFF: 
https://github.com/llvm/llvm-project/commit/feda31e0483c47cbef549c068aab1c60e7d10572.diff

LOG: [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

Added: 
    

Modified: 
    clang/bindings/python/clang/cindex.py

Removed: 
    


################################################################################
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()
 


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to