aboutsummaryrefslogtreecommitdiff
path: root/bindings/python/clang
AgeCommit message (Collapse)Author
2012-02-17[clang.py] Implement Type.element_typeGregory Szorc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150799 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-05[clang.py] Implement Type.is_podGregory Szorc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149842 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-05[clang.py] Change type -> TypeTobias Grosser
Names that have corresponding classes in python are commonly started with an uppercase letter. Let's follow that convention. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149831 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-05[clang.py] Implement Cursor.enum_typeTobias Grosser
Contributed by: Gregory Szorc <gregory.szorc@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149830 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-05[clang.py] Implement Cursor.underlying_typedef_typeTobias Grosser
Contributed by: Gregory Szorc <gregory.szorc@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149829 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-05[clang.py] add TypeKind.VECTORTobias Grosser
Added a missing enumeration. Contributed by: Gregory Szorc <gregory.szorc@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149828 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-05[clang.py] Add CursorKind.{is_translation_unit, is_preprocessing, is_unexposed}Tobias Grosser
Contributed by: Gregory Szorc <gregory.szorc@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149827 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-05[clang.py] Implement Cursor.hashTobias Grosser
Contributed by: Gregory Szorc <gregory.szorc@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149826 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-05[clang.py] Expose diagnostic category and option info to Python bindingTobias Grosser
Contributed by: Gregory Szorc <gregory.szorc@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149825 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-05[clang.py] Implement __eq__ and __ne__ on SourceLocation and SourceRangeTobias Grosser
There is no type checking in __eq__, so ctypes will throw if the wrong Python type is passed in to the C function. Personally, I feel garbage in means garbage out and it isn't worth testing for this explicitly. Contributed by: Gregory Szorc <gregory.szorc@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149824 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-30Add CXX_FINAL_ATTR, CXX_OVERRIDE_ATTR, ANNOTATE_ATTR and ASM_LABEL_ATTR to theRafael Espindola
python bindinds. patch by Tom Schuster! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147378 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-23Mass rename C1x references to C11. The name hasn't proliferated like "C++0x" ↵Benjamin Kramer
so this patch is surprisingly small. Also drop -Wc1x-extensions in favor of -Wc11-extensions. I don't think we need to keep this around for compatibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147221 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-31cindex.py: Remove more ternary operator + whitespace fixesTobias Grosser
Another batch of ternary operators and some whitespace fixes (Getting in sync with the clang_complete version of this file) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143330 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-31clang.py: Remove use of ternary operatorsTobias Grosser
This change is necessary to make this file python 2.4 compatible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143324 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-31cindex.py: Allow to create a cursor from file/row/columnTobias Grosser
We add a constructor to create a SourceLocation from a position in a file and we use this SourceLocation to retrieve a cursor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143322 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-31cindex.py: Add File.create_from_name()Tobias Grosser
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143321 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-19 Add support for constant arrays, from Anders Waldenborg!.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142477 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-19Add TypeKind.CONSTANTARRAY, from Anders Waldenborg!Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142476 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-19Fix error message for unknown type kind, from Anders Waldenborg!Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142475 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-19This new field was introduced in clang-c in r141277Douglas Gregor
Python needs this in its structure definition so it allocates enough memory. From Anders Waldenborg! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142474 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-05Expose more statement, expression, and declaration kinds in libclang,Douglas Gregor
from Manuel Holtgrewe! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141200 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30Add support for Cursor.displayname in python bindings, from Anders Waldenborg!Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138785 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17[python] Fix bug of the SourceLocation binding.Argyrios Kyrtzidis
Patch by Anders Waldenborg! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137829 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17[python] Add support for CXType to python bindings.Argyrios Kyrtzidis
Patch by Anders Waldenborg! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137797 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-06Improve the Python bindings for libclang in a few ways, from EliDouglas Gregor
Bendersky. Specifically: * Implemented a new function in libclang: clang_isAttribute * Fixing TranslationUnit.get_includes to only go through the argument * buffer when it contains something. This fixed a crash on Windows * clang_getFileName returns CXString, not char*. Made appropriate * fixes in cindex.py - now the relevant tests pass and we can see the * full locations correctly again (previously there was garbage in * place of the file name) * Exposed clang_getCursorDisplayName to the python bindings git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134460 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05python bindings: Add support for different kind of completion chunksTobias Grosser
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124959 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05python bindings: Get the string representation of a CompletionChunkTobias Grosser
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124958 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05python bindings: Add CodeCompletionResultsTobias Grosser
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124957 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05python bindings: Add support for translationUnit.reparse().Tobias Grosser
This is the first step to make the clang_complete vim plugin work with libclang. Reparsing improves parsing time from 0.8 to 0.25 secs for one of my LLVM .cpp files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124956 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05python bindings: fix Diagnostics.range iteratorTobias Grosser
The iterator did never throw an IndexError. It was therefore not possible to use it in a normal foreach loop as that loop would never stop. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124953 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05python bindings: Use python Diagnostics as function argumentsTobias Grosser
This improves the readability of the code and fixes one testsuite bug. The bug happend, because we only stored the pointer to the diagnostic in the FixIt iterator, but not the python Diagnostic object. So it could happen that the FixIt iterator still exists, but the python Diagnostic object is freed. However, as the python Diagnostic is freed the pointer to the diagnostic is also freed and the FixIt iterator is referencing a freed pointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124952 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05python bindings: Synchronize cursor kindsTobias Grosser
clang-c/Index.h contained cursor kinds not yet available in the python bindings. Contributed-By: jmuizelaar@mozilla.com git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124951 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-30Rename 'CIndex' to 'libclang', since it has basically become our stable publicDaniel Dunbar
(C) API, and will likely grow further in this direction in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102779 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-06Rename the new Iterator objects and raise an assertion instead of returning ↵Benjamin Kramer
invalid objects when the key is out of range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97881 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-06Update the python bindings for recent changes in the CIndex API.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97880 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13cindex/Python: Add TranslationUnit.get_includes, patch by Andrew Sutton!Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96106 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13cindex/Python: Update for clang_getDiagnosticRange... API changes.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96105 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-30cindex/Python: Add full support for Diagnostic and FixIt objects, available ↵Daniel Dunbar
via TranslationUnit.diagnostics. Several important FIXMEs remain: - We aren't getting all the notes? - There is still no way to get diagnostics for invalid inputs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94933 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-30cindex/Python: Update SourceLocation and SourceRange structures to match API ↵Daniel Dunbar
changes. Hurray for exposing implementation details!!! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94932 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-30cindex/Python: Update Index.create for removal of displayDiagnostics.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94931 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29cindex/Python: Update to support _getInstantiationLocation's new offset value.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94813 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25cindex/Python: Move translation unit load functions to Index, there isn't a ↵Daniel Dunbar
good reason to have separate static methods for this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94419 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25cindex/Python: Support file objects as unsaved_files, albeit inefficiently.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94418 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25cindex/Python: Implement support for unsaved/remapped files.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94396 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25cindex/Python: Fix/simplify Index.parse() passing command line arguments.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94394 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25cindex/Python: Update comments, add module docstrings, add LLVM headers.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94392 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24cindex/Python: Move Cursor.is_ methods to CursorKind, and add test.Daniel Dunbar
Also, add CursorKind.get_all_kinds(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94389 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24cindex/Python: Implement explicit objects for CursorKind enumeration values.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94388 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24cindex/Python: Fetch SourceLocation instantiation location information on ↵Daniel Dunbar
lazily, it isn't free. Also, add repr() support to SourceRange. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94387 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24cindex/Python: Add Cursor.get_usr().Daniel Dunbar
Also, change Cursor.spelling to return None for non-decls, for consistency with get_usr(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94386 91177308-0d34-0410-b5e6-96231b3b80d8