Anders Waldenborg
750c04f1a5
[python] Add testcase for annotation cursor
...
llvm-svn: 156022
2012-05-02 21:28:34 +00:00
Anders Waldenborg
94c71052e7
[python] Add Cursor.enum_value wrapping clang_getEnumConstantDeclValue
...
llvm-svn: 156017
2012-05-02 20:57:33 +00:00
Anders Waldenborg
c2d64c428a
[python] Add testcase for enum with specified underlaying type
...
llvm-svn: 156009
2012-05-02 19:39:46 +00:00
Anders Waldenborg
23373c73f0
[python] Run tests for c++ with std=c++11
...
llvm-svn: 156008
2012-05-02 19:37:16 +00:00
Anders Waldenborg
d8f66426a1
[python] Fix warning in c-code inside testcase
...
llvm-svn: 156007
2012-05-02 19:35:37 +00:00
Gregory Szorc
5a833d6680
[clang.py] Implement TypeKind.spelling
...
llvm-svn: 154769
2012-04-15 18:51:10 +00:00
Gregory Szorc
a8b30c5b61
[clang.py] Implement Cursor.objc_type_encoding
...
llvm-svn: 152513
2012-03-10 22:23:27 +00:00
Gregory Szorc
0e20a09165
[clang.py] Refactor get_tu and get_cursor test helper functions into util.py
...
llvm-svn: 152510
2012-03-10 22:19:05 +00:00
Gregory Szorc
74226d3597
[clang.py] Return bool from Cursor.__eq__
...
llvm-svn: 152011
2012-03-05 00:42:15 +00:00
Gregory Szorc
5b4173912f
[clang.py] Test Cursor.__ne__
...
llvm-svn: 151504
2012-02-26 21:56:32 +00:00
Gregory Szorc
19bf2398ba
[clang.py] Format and add documention for Type
...
llvm-svn: 150972
2012-02-20 17:58:40 +00:00
Gregory Szorc
a5a89b9564
[clang.py] Add tests for Type.is_volatile_qualified and Type.is_restrict_qualified
...
llvm-svn: 150971
2012-02-20 17:58:02 +00:00
Gregory Szorc
495c7dae5d
[clang.py] Implement Type.argument_types()
...
llvm-svn: 150970
2012-02-20 17:45:30 +00:00
Gregory Szorc
8a840febac
[clang.py] Implement Type.__eq__ and Type.__ne__
...
llvm-svn: 150969
2012-02-20 17:44:49 +00:00
Gregory Szorc
8428c242b8
[clang.py] Implement Type.is_function_variadic
...
llvm-svn: 150936
2012-02-19 18:28:33 +00:00
Gregory Szorc
dd19169988
[clang.py] Implement Type.element_count
...
llvm-svn: 150800
2012-02-17 07:47:38 +00:00
Gregory Szorc
e1e9ec1082
[clang.py] Implement Type.element_type
...
llvm-svn: 150799
2012-02-17 07:44:46 +00:00
Gregory Szorc
04d612aa12
[clang.py] Implement Type.is_pod
...
llvm-svn: 149842
2012-02-05 19:42:06 +00:00
Tobias Grosser
6a7644683c
[clang.py] Change type -> Type
...
Names that have corresponding classes in python are commonly started with an
uppercase letter. Let's follow that convention.
llvm-svn: 149831
2012-02-05 12:15:56 +00:00
Tobias Grosser
a0022e911e
[clang.py] Implement Cursor.enum_type
...
Contributed by: Gregory Szorc <gregory.szorc@gmail.com>
llvm-svn: 149830
2012-02-05 11:42:25 +00:00
Tobias Grosser
062d2a3c89
[clang.py] Implement Cursor.underlying_typedef_type
...
Contributed by: Gregory Szorc <gregory.szorc@gmail.com>
llvm-svn: 149829
2012-02-05 11:42:20 +00:00
Tobias Grosser
13d92a4b8f
[clang.py] add TypeKind.VECTOR
...
Added a missing enumeration.
Contributed by: Gregory Szorc <gregory.szorc@gmail.com>
llvm-svn: 149828
2012-02-05 11:42:14 +00:00
Tobias Grosser
49bd32c1d2
[clang.py] Add CursorKind.{is_translation_unit, is_preprocessing, is_unexposed}
...
Contributed by: Gregory Szorc <gregory.szorc@gmail.com>
llvm-svn: 149827
2012-02-05 11:42:09 +00:00
Tobias Grosser
ebb0ae82a2
[clang.py] Implement Cursor.hash
...
Contributed by: Gregory Szorc <gregory.szorc@gmail.com>
llvm-svn: 149826
2012-02-05 11:42:03 +00:00
Tobias Grosser
9fc76f2cbf
[clang.py] Expose diagnostic category and option info to Python binding
...
Contributed by: Gregory Szorc <gregory.szorc@gmail.com>
llvm-svn: 149825
2012-02-05 11:41:58 +00:00
Tobias Grosser
fb7b4aa45a
[clang.py] Implement __eq__ and __ne__ on SourceLocation and SourceRange
...
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>
llvm-svn: 149824
2012-02-05 11:40:59 +00:00
Rafael Espindola
30ccf36224
Add CXX_FINAL_ATTR, CXX_OVERRIDE_ATTR, ANNOTATE_ATTR and ASM_LABEL_ATTR to the
...
python bindinds.
patch by Tom Schuster!
llvm-svn: 147378
2011-12-30 15:27:22 +00:00
Benjamin Kramer
e56f393249
Mass rename C1x references to C11. The name hasn't proliferated like "C++0x" 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.
llvm-svn: 147221
2011-12-23 17:00:35 +00:00
Tobias Grosser
3510e999c4
cindex.py: Remove more ternary operator + whitespace fixes
...
Another batch of ternary operators and some whitespace fixes
(Getting in sync with the clang_complete version of this file)
llvm-svn: 143330
2011-10-31 02:06:50 +00:00
Tobias Grosser
237f5a07fa
clang.py: Remove use of ternary operators
...
This change is necessary to make this file python 2.4 compatible.
llvm-svn: 143324
2011-10-31 00:49:07 +00:00
Tobias Grosser
e15496f1d7
cindex.py: Allow to create a cursor from file/row/column
...
We add a constructor to create a SourceLocation from a position in
a file and we use this SourceLocation to retrieve a cursor.
llvm-svn: 143322
2011-10-31 00:31:32 +00:00
Tobias Grosser
80c4b81f54
cindex.py: Add File.create_from_name()
...
llvm-svn: 143321
2011-10-31 00:07:19 +00:00
Douglas Gregor
5fdc4de718
Add support for constant arrays, from Anders Waldenborg!.
...
llvm-svn: 142477
2011-10-19 05:51:43 +00:00
Douglas Gregor
89861066ed
Add TypeKind.CONSTANTARRAY, from Anders Waldenborg!
...
llvm-svn: 142476
2011-10-19 05:50:34 +00:00
Douglas Gregor
d59d02cc38
Fix error message for unknown type kind, from Anders Waldenborg!
...
llvm-svn: 142475
2011-10-19 05:49:29 +00:00
Douglas Gregor
32df3664be
This new field was introduced in clang-c in r141277
...
Python needs this in its structure definition so it allocates enough
memory. From Anders Waldenborg!
llvm-svn: 142474
2011-10-19 05:47:46 +00:00
Douglas Gregor
4c362d5310
Expose more statement, expression, and declaration kinds in libclang,
...
from Manuel Holtgrewe!
llvm-svn: 141200
2011-10-05 19:00:14 +00:00
Douglas Gregor
506d34a0df
Update python testcase for GNU old-style field designator warning,
...
from Anders Waldenborg!
llvm-svn: 138786
2011-08-30 00:16:30 +00:00
Douglas Gregor
7c7c068251
Add support for Cursor.displayname in python bindings, from Anders Waldenborg!
...
llvm-svn: 138785
2011-08-30 00:15:34 +00:00
Argyrios Kyrtzidis
3fce368d87
[python] Fix bug of the SourceLocation binding.
...
Patch by Anders Waldenborg!
llvm-svn: 137829
2011-08-17 17:20:24 +00:00
Argyrios Kyrtzidis
8f6bd2d653
[python] Add test_type.py by Anders Waldenborg, which I forgot to commit in r137797.
...
llvm-svn: 137828
2011-08-17 17:01:10 +00:00
Argyrios Kyrtzidis
f872dc4c3b
[python] Add support for CXType to python bindings.
...
Patch by Anders Waldenborg!
llvm-svn: 137797
2011-08-17 00:43:03 +00:00
Douglas Gregor
a98034a25e
Improve the Python bindings for libclang in a few ways, from Eli
...
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
llvm-svn: 134460
2011-07-06 03:00:34 +00:00
Tobias Grosser
b0e0597d07
python bindings: Add support for different kind of completion chunks
...
llvm-svn: 124959
2011-02-05 17:54:10 +00:00
Tobias Grosser
b0949a17a0
python bindings: Get the string representation of a CompletionChunk
...
llvm-svn: 124958
2011-02-05 17:54:07 +00:00
Tobias Grosser
85bb48fce7
python bindings: Add CodeCompletionResults
...
llvm-svn: 124957
2011-02-05 17:54:04 +00:00
Tobias Grosser
2a8aac5ff4
python bindings: Add support for translationUnit.reparse().
...
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.
llvm-svn: 124956
2011-02-05 17:54:00 +00:00
Tobias Grosser
4748651060
python bindings: Include local headers the right way.
...
llvm-svn: 124955
2011-02-05 17:53:55 +00:00
Tobias Grosser
0e19c192f5
python bindings: Remove unneeded instruction
...
llvm-svn: 124954
2011-02-05 17:53:53 +00:00
Tobias Grosser
5153e79931
python bindings: fix Diagnostics.range iterator
...
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.
llvm-svn: 124953
2011-02-05 17:53:51 +00:00