diff options
author | Gregory Szorc <gregory.szorc@gmail.com> | 2012-06-09 16:21:34 +0000 |
---|---|---|
committer | Gregory Szorc <gregory.szorc@gmail.com> | 2012-06-09 16:21:34 +0000 |
commit | e65b34deb1f8f7c80765f1c00476e7609bb9eada (patch) | |
tree | fe1d0b2cc047332c2ba78e4d5b2dd806149c9368 /bindings/python/clang/cindex.py | |
parent | db3d68f188eb0883407a25ef09c1d85e217b97ef (diff) |
[clang.py] Implement Cursor.is_static_method
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158277 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/python/clang/cindex.py')
-rw-r--r-- | bindings/python/clang/cindex.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bindings/python/clang/cindex.py b/bindings/python/clang/cindex.py index 257b7aeb19..7a637112a2 100644 --- a/bindings/python/clang/cindex.py +++ b/bindings/python/clang/cindex.py @@ -949,6 +949,12 @@ class Cursor(Structure): """ return Cursor_is_def(self) + def is_static_method(self): + """Returns True if the cursor refers to a C++ member function or member + function template that is declared 'static'. + """ + return Cursor_is_static_method(self) + def get_definition(self): """ If the cursor is a reference to a declaration or a declaration of @@ -2176,6 +2182,10 @@ Cursor_is_def = lib.clang_isCursorDefinition Cursor_is_def.argtypes = [Cursor] Cursor_is_def.restype = bool +Cursor_is_static_method = lib.clang_CXXMethod_isStatic +Cursor_is_static_method.argtypes = [Cursor] +Cursor_is_static_method.restype = bool + Cursor_def = lib.clang_getCursorDefinition Cursor_def.argtypes = [Cursor] Cursor_def.restype = Cursor |