summaryrefslogtreecommitdiffstats
path: root/bindings/python/tests
Commit message (Collapse)AuthorAgeFilesLines
* [clang.py] Implement TypeKind.spellingGregory Szorc2012-04-151-1/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154769 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang.py] Implement Cursor.objc_type_encodingGregory Szorc2012-03-101-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152513 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang.py] Refactor get_tu and get_cursor test helper functions into util.pyGregory Szorc2012-03-105-112/+130
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152510 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang.py] Test Cursor.__ne__Gregory Szorc2012-02-261-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151504 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang.py] Format and add documention for TypeGregory Szorc2012-02-201-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150972 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang.py] Add tests for Type.is_volatile_qualified and ↵Gregory Szorc2012-02-201-2/+45
| | | | | | Type.is_restrict_qualified git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150971 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang.py] Implement Type.argument_types()Gregory Szorc2012-02-201-107/+135
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150970 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang.py] Implement Type.__eq__ and Type.__ne__Gregory Szorc2012-02-201-0/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150969 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang.py] Implement Type.is_function_variadicGregory Szorc2012-02-191-18/+45
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150936 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang.py] Implement Type.element_countGregory Szorc2012-02-171-0/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150800 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang.py] Implement Type.element_typeGregory Szorc2012-02-171-1/+33
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150799 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang.py] Implement Type.is_podGregory Szorc2012-02-051-0/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149842 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang.py] Implement Cursor.enum_typeTobias Grosser2012-02-051-0/+15
| | | | | | 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
* [clang.py] Implement Cursor.underlying_typedef_typeTobias Grosser2012-02-051-0/+15
| | | | | | 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
* [clang.py] Add CursorKind.{is_translation_unit, is_preprocessing, is_unexposed}Tobias Grosser2012-02-051-0/+9
| | | | | | 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
* [clang.py] Implement Cursor.hashTobias Grosser2012-02-051-0/+1
| | | | | | 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
* [clang.py] Expose diagnostic category and option info to Python bindingTobias Grosser2012-02-051-3/+31
| | | | | | 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
* [clang.py] Implement __eq__ and __ne__ on SourceLocation and SourceRangeTobias Grosser2012-02-051-1/+19
| | | | | | | | | | 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
* cindex.py: Allow to create a cursor from file/row/columnTobias Grosser2011-10-311-1/+13
| | | | | | | 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
* cindex.py: Add File.create_from_name()Tobias Grosser2011-10-311-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143321 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for constant arrays, from Anders Waldenborg!.Douglas Gregor2011-10-191-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142477 91177308-0d34-0410-b5e6-96231b3b80d8
* Add TypeKind.CONSTANTARRAY, from Anders Waldenborg!Douglas Gregor2011-10-191-0/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142476 91177308-0d34-0410-b5e6-96231b3b80d8
* Update python testcase for GNU old-style field designator warning,Douglas Gregor2011-08-301-1/+1
| | | | | | | from Anders Waldenborg! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138786 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for Cursor.displayname in python bindings, from Anders Waldenborg!Douglas Gregor2011-08-301-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138785 91177308-0d34-0410-b5e6-96231b3b80d8
* [python] Fix bug of the SourceLocation binding.Argyrios Kyrtzidis2011-08-171-0/+50
| | | | | | Patch by Anders Waldenborg! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137829 91177308-0d34-0410-b5e6-96231b3b80d8
* [python] Add test_type.py by Anders Waldenborg, which I forgot to commit in ↵Argyrios Kyrtzidis2011-08-171-0/+76
| | | | | | r137797. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137828 91177308-0d34-0410-b5e6-96231b3b80d8
* [python] Add support for CXType to python bindings.Argyrios Kyrtzidis2011-08-171-1/+3
| | | | | | Patch by Anders Waldenborg! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137797 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve the Python bindings for libclang in a few ways, from EliDouglas Gregor2011-07-062-8/+15
| | | | | | | | | | | | | | | | | | | 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
* python bindings: Add support for translationUnit.reparse().Tobias Grosser2011-02-051-0/+9
| | | | | | | | 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
* python bindings: Include local headers the right way.Tobias Grosser2011-02-051-4/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124955 91177308-0d34-0410-b5e6-96231b3b80d8
* python bindings: Remove unneeded instructionTobias Grosser2011-02-051-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124954 91177308-0d34-0410-b5e6-96231b3b80d8
* python bindings: fix Diagnostics.range iteratorTobias Grosser2011-02-051-0/+23
| | | | | | | 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
* CIndex: Switch CXSourceRange to proper half-open intervals.Daniel Dunbar2010-02-141-1/+1
| | | | | | - Doug, please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96162 91177308-0d34-0410-b5e6-96231b3b80d8
* cindex/Python: Add TranslationUnit.get_includes, patch by Andrew Sutton!Daniel Dunbar2010-02-135-0/+42
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96106 91177308-0d34-0410-b5e6-96231b3b80d8
* cindex/Python: Add full support for Diagnostic and FixIt objects, available ↵Daniel Dunbar2010-01-301-0/+48
| | | | | | | | | | 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
* cindex/Python: Update Index.create for removal of displayDiagnostics.Daniel Dunbar2010-01-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94931 91177308-0d34-0410-b5e6-96231b3b80d8
* cindex/Python: Support file objects as unsaved_files, albeit inefficiently.Daniel Dunbar2010-01-251-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94418 91177308-0d34-0410-b5e6-96231b3b80d8
* cindex/Python: Add Cursor test.Daniel Dunbar2010-01-251-0/+59
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94397 91177308-0d34-0410-b5e6-96231b3b80d8
* cindex/Python: Implement support for unsaved/remapped files.Daniel Dunbar2010-01-251-0/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94396 91177308-0d34-0410-b5e6-96231b3b80d8
* cindex/Python: Fix/simplify Index.parse() passing command line arguments.Daniel Dunbar2010-01-252-0/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94394 91177308-0d34-0410-b5e6-96231b3b80d8
* cindex/Python: Move Cursor.is_ methods to CursorKind, and add test.Daniel Dunbar2010-01-242-1/+28
| | | | | | Also, add CursorKind.get_all_kinds(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94389 91177308-0d34-0410-b5e6-96231b3b80d8
* cindex/Python: Convert CXString objects to regular Python strings below API.Daniel Dunbar2010-01-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94384 91177308-0d34-0410-b5e6-96231b3b80d8
* cindex/Python: Add TranslationUnit.cursor.Daniel Dunbar2010-01-241-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94355 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial checkin of CIndex Python bindings, by Andrew Sutton!Daniel Dunbar2010-01-245-0/+31
- Some tweaks by me for API changes, Darwin, and x86_64 support. Still needs substantial updating to match recent CIndex API changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94349 91177308-0d34-0410-b5e6-96231b3b80d8