summaryrefslogtreecommitdiffstats
path: root/clang/bindings
Commit message (Collapse)AuthorAgeFilesLines
...
* Expose the CUDA shared attribute to the C API.Eli Bendersky2014-08-081-0/+1
| | | | | | | | Similar to r209767, which exposed other CUDA-related attributes. Patch by Rob Springer. llvm-svn: 215208
* Expose the name mangling C API to Python bindings.Eli Bendersky2014-08-052-0/+27
| | | | llvm-svn: 214930
* Reformat docstring to 80-colEli Bendersky2014-07-311-3/+3
| | | | llvm-svn: 214412
* cindex.py: remove obsolete workaround and FIXMEAlp Toker2014-06-221-4/+0
| | | | | | | | | clang_getCursorSpelling() doesn't assert on non-declarations any more and the behaviour is covered by c-index tests. Passes nosetests. llvm-svn: 211482
* Implement a convenience recursive walk method over a cursor and its descendants.Eli Bendersky2014-05-292-29/+21
| | | | | | | | | | | | | Before r160106 there was a way to recursively visit all descendants of a cursor via Cursor_visit, but it was removed. Since then, every user needs to reimplement the recursive descent into get_children. Adding a walk_preorder() method to Cursor that conveniently implements recursive walking in a Pythonic way. This also greatly simplifies get_cursor and get_cursors in tests/cindex/util.py (walk_preorder is now tested through these utility functions, since they are used in many tests). llvm-svn: 209793
* Expose CUDA function attributes to the C interface.Eli Bendersky2014-05-281-0/+4
| | | | | | | | Until now all CUDA-specific attributes were represented with CXCursor_UnexposedAttr; now they are actually implemented, including the Python bindings. llvm-svn: 209767
* Trim trailing whitespace in cindex.pyEli Bendersky2014-05-281-6/+6
| | | | llvm-svn: 209754
* cindex/test_cursor.py: no need to skip implicit decls in testsAlp Toker2014-05-211-8/+1
| | | | | | | | | clang was fixed some time ago to always skip "builtins and other cruft" so tools no longer need hacks like this. Passes nosetests. llvm-svn: 209316
* Clean up language and grammar.Eric Christopher2014-05-201-2/+2
| | | | | | | Based on a patch by jfcaron3@gmail.com! PR19806 llvm-svn: 209215
* cindex-dump.py: fix the --show-ids description stringAlp Toker2014-05-051-1/+1
| | | | | | It looks like this was botched back in r94936. llvm-svn: 207947
* Fix cindex-dump.py --show-idsAlp Toker2014-05-051-1/+1
| | | | | | | | | | | | | This option flag was incorrectly expecting an argument: $ cindex-dump.py --show-ids test.cpp cindex-dump.py: error: invalid number arguments With this change the feature correctly gets enabled by --show-ids. No tests. llvm-svn: 207946
* [libclang] Add attribute support for 'pure', 'const' and 'noduplicate'.Joey Gouly2014-05-011-0/+3
| | | | | | This bumps CINDEX_VERSION_MINOR up (to 26). llvm-svn: 207767
* Comment parsing: remove HTML attribute validationDmitri Gribenko2014-04-301-1/+3
| | | | | | | | | | | | Since the community says that a blacklist is not good enough, and I don't have enough time now to implement a proper whitelist, let's just remove the attribute validation. But, nevertheless, we can still communicate in the generated XML if our parser found an issue with the HTML. But this bit is best-effort and is specifically called out in the schema as such. llvm-svn: 207712
* Fix the method len of the CompletionString object. Patch by Christopher GreeneSylvestre Ledru2014-04-271-1/+1
| | | | llvm-svn: 207348
* bindings: expose C++ access specifiersSaleem Abdulrasool2014-04-252-0/+93
| | | | | | | | | | Expose the enum CX_CXXAccessSpecifier in the python bindings as a property of the cursor. If access specifier is not applicable to the node, return the INVALID specifier rather than raising an exception. Patch by Tamás Szeli! llvm-svn: 207173
* Comment parsing: in the generated XML file, mark HTML that is safe to passDmitri Gribenko2014-04-221-0/+6
| | | | | | | | | | | through to the output even if the input comment comes from an untrusted source Attribute filtering is currently based on a blacklist, which right now includes all event handler attributes (they contain JavaScipt code). It should be switched to a whitelist, but going over all of the HTML5 spec requires a significant amount of time. llvm-svn: 206882
* cindex.py: Avoid deprecated functionAlp Toker2014-04-201-4/+4
| | | | | | | | | Implement Diagnostic::category_name() using clang_getDiagnosticCategoryText() instead of the deprected clang_getDiagnosticCategoryName(). Preserves existing behaviour and API covered by existing tests. llvm-svn: 206712
* Use the correct symbol for a left bracket.Bill Wendling2014-03-141-1/+1
| | | | | | PR19089 llvm-svn: 203906
* [libclang/python] Use a Python standard library module to create a temporary ↵Argyrios Kyrtzidis2014-02-201-9/+2
| | | | | | | | file. Patch by Brian Gesiak! llvm-svn: 201762
* [libclang/python] Add CompilationDatabase.getAllCompileCommands to the ↵Argyrios Kyrtzidis2013-12-202-0/+34
| | | | | | | | python bindings. Patch by Laszlo Nagy! llvm-svn: 197765
* Fix a tranche of comment, test and doc typosAlp Toker2013-12-051-1/+1
| | | | llvm-svn: 196510
* Documentation parsing: add support for \throws \throw \exception commandsDmitri Gribenko2013-11-121-1/+11
| | | | llvm-svn: 194521
* [libclang/python] Add __contains__ to SourceRange class.Argyrios Kyrtzidis2013-10-311-0/+23
| | | | | | Patch by Loïc Jaquemet! llvm-svn: 193725
* [libclang] Introduce clang_Type_getCXXRefQualifier whichexposes ↵Argyrios Kyrtzidis2013-10-111-5/+60
| | | | | | | | ref-qualifier information of function type. Patch by Che-Liang Chiou! llvm-svn: 192493
* [libclang] Add some tests by Loïc Jaquemet that I forgot to add earlier.Argyrios Kyrtzidis2013-10-071-0/+40
| | | | llvm-svn: 192108
* [libclang] python: expose a few functions, patch by Loïc Jaquemet!Argyrios Kyrtzidis2013-10-032-0/+46
| | | | llvm-svn: 191907
* [libclang] Introduce clang_Type_getClassType which returns the class type of ↵Argyrios Kyrtzidis2013-10-031-0/+12
| | | | | | | | a member pointer type. Patch by Che-Liang Chiou! llvm-svn: 191906
* [libclang] python: fix return type of clang_Type_getSizeOf().Argyrios Kyrtzidis2013-09-251-1/+1
| | | | | | Patch by Loïc Jaquemet! llvm-svn: 191346
* [libclang] Provide location for attributes and expose 'packed' attribute.Argyrios Kyrtzidis2013-09-251-0/+1
| | | | | | Patch by Loïc Jaquemet! llvm-svn: 191345
* [libclang] Don't report a DecayedType as "unexposed", report it as the ↵Argyrios Kyrtzidis2013-09-161-0/+10
| | | | | | | | original (as written) type. Patch by Anders Waldenborg! llvm-svn: 190796
* [libclang] Expose the rest of the array types.Argyrios Kyrtzidis2013-07-232-2/+13
| | | | | | Patch by Che-Liang Chiou! llvm-svn: 186967
* Comment parsing: allow "\param ..." to describe variadic argumentsDmitri Gribenko2013-06-241-3/+8
| | | | | | | | Original patch by Fariborz Jahanian; extended by me. Fixes rdar://14124644 llvm-svn: 184688
* [libclang/python] Add a few "cursor kinds" that were missing in the python ↵Argyrios Kyrtzidis2013-06-112-5/+45
| | | | | | | | binding for libclang. Patch by Mathieu Baudet! llvm-svn: 183760
* libclang: add a function to check whether a member function is pure virtualDmitri Gribenko2013-05-171-0/+4
| | | | | | Patch by Seth Fowler. llvm-svn: 182139
* Fix return type of isBitfield in the binding definitionDmitri Gribenko2013-04-211-1/+1
| | | | | | Patch by Loïc Jaquemet. llvm-svn: 179984
* [libclang] Expose record layout info via new libclang functions:Argyrios Kyrtzidis2013-04-113-2/+115
| | | | | | | | | | | clang_Type_getAlignOf clang_Type_getSizeOf clang_Type_getOffsetOf clang_Cursor_isBitField Patch by Loïc Jaquemet! llvm-svn: 179251
* cindex.py: Handle NULL pointers when parsing translation unitsTobias Grosser2013-03-192-2/+19
| | | | | | | | | | | | | The code inside cindex.py was comparing NULL pointer returned by clang_parseTranslationUnit and clang_createTranslationUnit with None. However, as illustrated by the two tests I've added, those conditions were ineffective which resulted in assert triggering later on. Instead, a pointer is now treated as a boolean value, a NULL pointer being False. Contributed-by: Xavier Deguillard <deguilx@gmail.com> llvm-svn: 177408
* doxygen command. Add 'attention' command to list of similarFariborz Jahanian2013-02-261-0/+1
| | | | | | doxygen commands. // rdar://12379053 llvm-svn: 176127
* Comment parsing: improve the fidelity of XML output for many block commandsDmitri Gribenko2013-02-011-0/+23
| | | | | | | | | | | | | | This change introduces a 'kind' attribute for the <Para> tag, that captures the kind of the parent block command. For example: \todo Meow. used to be just <Para>Meow.</Para>, but now it is <Para kind="todo">Meow.</Para> llvm-svn: 174216
* Fix indentDmitri Gribenko2013-02-011-1/+1
| | | | llvm-svn: 174201
* [Comment parsing] Add support for recognizingFariborz Jahanian2013-01-311-0/+29
| | | | | | | | \headerfile command and representing it in an xml document. Patch reviewed by Dmitri Gribenko. // rdar://12397511 llvm-svn: 174109
* [cindex.py]: Use spaces instead of tabsTobias Grosser2013-01-201-3/+3
| | | | | | The tabs slipped in accidentally. llvm-svn: 172934
* [cindex.py] Add cache for CompletionChunk spellingsTobias Grosser2013-01-191-0/+29
| | | | | | | | | | | | | Most of the CompletionChunks represent braces, colons or other one character spellings. There is no need to call libclang, to figure out how to write a colon. Instead we use an internal cache to retrieve the correct spelling. As function calls from python are very expensive and this is a performance critical part of auto completion this patch makes formatting of auto completion results a lot faster. Formatting time changes from 0.57 to 0.45 seconds llvm-svn: 172901
* [cindex.py] Replace CachedProperty with our own implementationTobias Grosser2013-01-191-3/+9
| | | | | | | | | | | | This is a very performance critical point for auto completion. The manual implementation gives a large speedup. As it does not complicate the code a lot, I figured it is worth the change. If anybody understands why the CachedProperty is here so much slower, I am very interested in working on an improvement of CachedProperty. Formatting time changes from 0.72 to 0.57 seconds. llvm-svn: 172900
* [cindex.py]: Speed up lookup of the completion kindTobias Grosser2013-01-191-7/+11
| | | | | | | | | We can directly the number of the kind instead of going through the completionChunkKindMap. Formatting time changes from 0.84 to 0.72 seconds. llvm-svn: 172899
* [python bindings] Expose cursor.referenced (clang_getCursorReferenced).Argyrios Kyrtzidis2013-01-022-0/+20
| | | | | | Patch by Matthew King! llvm-svn: 171423
* Fix a copypasto bug. Also rename the parameter in question to not shadow theMatt Beaumont-Gay2012-12-111-3/+3
| | | | | | | | 'file' builtin, and fix up a docstring a little. Hat tip to Sebastian Kreft Carreno at Google for noticing the bug. llvm-svn: 169887
* [clang.py] Add Cursor.get_arguments()Gregory Szorc2012-11-012-0/+24
| | | | | | Patch provided by Matthias Kleine <matthias_kleine@gmx.de> llvm-svn: 167216
* [Doc parsing]: This patch adds <Declaration> tag to Fariborz Jahanian2012-10-171-0/+28
| | | | | | | | | | | XML comment for declarations which pretty-prints declaration. I had to XFAIL one test annotate-comments.cpp. This test is currently unmaintainable as written. Dmitri G., can you see what we can do about this test. We should change this test such that adding a new tag does not wreck havoc to the test. llvm-svn: 166130
* Python bindings: fix typo.Benjamin Kramer2012-10-071-1/+1
| | | | llvm-svn: 165375
OpenPOWER on IntegriCloud