aboutsummaryrefslogtreecommitdiff
path: root/bindings
AgeCommit message (Collapse)Author
2012-05-14[clang.py] Implement Cursor.canonicalGregory Szorc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156753 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-14[clang.py] Implement Cursor.result_typeGregory Szorc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156752 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-12[clang.py] Followup to TranslationUnit refactorGregory Szorc
* Document index argument in TranslationUnit.from_source * Add numeric error code to TranslationUnitSaveError string representation * Use None instead of [] for default argument value in TranslationUnit.codeComplete git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156722 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-08[clang.py] Remove trailing whitespace from recent commitsGregory Szorc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156373 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-08[clang.py] TranslationUnit API improvementsGregory Szorc
* TranslationUnit reading and parsing now implemented as TranslationUnit.from_ast() and TranslationUnit.from_source(). * Index.parse() and Index.read() implemented through above. * Index.parse() and Index.read() now raise a TanslationUnitLoadException instead of returning None if a TranslationUnit could not be instantiated. This is backwards incompatible. * Ability to save TranslationUnits via TranslationUnit.save(). * TranslationUnit now holds onto Index instance that created. This means the Index can't be GC'd until the TranslationUnit is itself GC'd, making memory management thoughtless. * Don't use [] as a default argument value, as the initial value used is reused for the duration of the program. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156372 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-07- Adding lexical_parent and semantic_parent properties to clang.cindex.CursorManuel Klimek
- Two new tests (one for each property), require libclang built from r155858 or later to pass - New test utility function (get_cursors) that gets all the nodes with a specific spelling. Patch by Evan Pipho. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156286 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-02[python] Add testcase for annotation cursorAnders Waldenborg
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156022 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-02[python] Add Cursor.enum_value wrapping clang_getEnumConstantDeclValueAnders Waldenborg
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156017 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-02[python] Add testcase for enum with specified underlaying typeAnders Waldenborg
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156009 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-02[python] Run tests for c++ with std=c++11Anders Waldenborg
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156008 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-02[python] Fix warning in c-code inside testcaseAnders Waldenborg
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156007 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-15[clang.py] Implement TypeKind.spellingGregory Szorc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154769 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-10[clang.py] Implement Cursor.objc_type_encodingGregory Szorc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152513 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-10[clang.py] Refactor get_tu and get_cursor test helper functions into util.pyGregory Szorc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152510 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05[clang.py] Return bool from Cursor.__eq__Gregory Szorc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152011 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26[clang.py] Test Cursor.__ne__Gregory Szorc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151504 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20[clang.py] Format and add documention for TypeGregory Szorc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150972 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20[clang.py] Add tests for Type.is_volatile_qualified and ↵Gregory Szorc
Type.is_restrict_qualified git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150971 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20[clang.py] Implement Type.argument_types()Gregory Szorc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150970 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20[clang.py] Implement Type.__eq__ and Type.__ne__Gregory Szorc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150969 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19[clang.py] Implement Type.is_function_variadicGregory Szorc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150936 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-17[clang.py] Implement Type.element_countGregory Szorc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150800 91177308-0d34-0410-b5e6-96231b3b80d8
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-30Update python testcase for GNU old-style field designator warning,Douglas Gregor
from Anders Waldenborg! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138786 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 test_type.py by Anders Waldenborg, which I forgot to commit in ↵Argyrios Kyrtzidis
r137797. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137828 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