summaryrefslogtreecommitdiffstats
path: root/clang/bindings
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* Python bindings: Add missing availability kind.Benjamin Kramer2012-10-072-9/+50
| | | | | | Patch by Leo Liu, test case by me. llvm-svn: 165374
* Comment to XML conversion: escape XML special chars correctly; use correctDmitri Gribenko2012-10-031-47/+53
| | | | | | regex for version tuples. llvm-svn: 165104
* [Doc parse]: SUpport for message in deprecated/unavailableFariborz Jahanian2012-10-021-2/+6
| | | | | | attribute going iinto XML document. llvm-svn: 165066
* [Doc parsing]: Add available and deprecated attribute infoFariborz Jahanian2012-10-021-3/+19
| | | | | | to XML output. // rdar://12378879 llvm-svn: 165039
* availability in structured documents. TakesFariborz Jahanian2012-10-011-2/+2
| | | | | | care of comments by Dimitri and Doug. llvm-svn: 164957
* Comment XML schema: correct indentation.Dmitri Gribenko2012-09-291-2/+2
| | | | llvm-svn: 164889
* [Doc parsing] Add availability information to generated Comment XML.Fariborz Jahanian2012-09-281-0/+36
| | | | | | | (I still need to add a test once I figure it out). Reviewed off-line by Doug. // rdar://12378879 llvm-svn: 164861
* Fix cindex.py compatibility with older libclang.soDmitri Gribenko2012-09-221-1/+10
| | | | | | | The issue is that we were calling clang_getCompletionBriefComment unconditionally. New we check if this function is available before calling it. llvm-svn: 164464
* Add bindings for clang_getCompletionBriefComment to cindex.py.Dmitri Gribenko2012-09-152-2/+63
| | | | llvm-svn: 163966
* Comment to XML conversion: we try not to emit empty <Discussion> elements, butDmitri Gribenko2012-09-131-2/+2
| | | | | | | it is not possible to guarantee that without duplicating logic or buffering <Discussion> element contents. So, allow empty <Discussion> elements in schema. llvm-svn: 163842
* [cindex.py] Make the use of a compatibilty check explicitTobias Grosser2012-09-051-4/+31
| | | | | | | | | | | | | | | | At the moment, we implictly check compatibility between the python bindings and libclang, as the python bindings will fail to load in case a method we use in libclang is not available. This patch makes the use of this compatibility check explicit and introduces a flag to optionally disable the check. This will allow us to further harden the compatibility check, but it also gives the user the possibility to disable the compatibility check to evaluate compatibility with older libclang versions. I added documentation that makes clear the python bindings are only tested with the libclang version they have been shipped with. llvm-svn: 163238
* [cindex.py] Allow to configure the path of libclangTobias Grosser2012-09-031-134/+189
| | | | | | | | | | | By calling cindex.Config.set_library_path(path) or cindex.Config.set_library_file(file) it is possible to specify from where we load libclang. This fixes an open FIXME. We also point the user to these functions, in case libclang can not be loaded sucessfully. llvm-svn: 163121
* [cindex.py] Add helper to initialize libclang functionsTobias Grosser2012-09-011-385/+533
| | | | | | | | | | | | | | | | The helper allows us to define how the initialization of functions should behave. We use this patch to provide an informative error message, in case a function is not available: "LibclangError: /home/grosser/Projekte/llvm/install/lib/libclang.so: undefined symbol: clang_method_added_in_2020. Please ensure that your python bindings are compatible with your libclang.so version." This patch also ensures that no spelling mistakes slip into the library initialization. At the moment, there are a couple of 'argtype' -> 'argtypes' mispellings that have been overlooked. llvm-svn: 163057
* [cindex.py] Cache the number of chunks in CompletionStringTobias Grosser2012-08-201-1/+5
| | | | | | | | Without this patch, lib.clang_getNumCompletionChunks is called at each _iteration_ of a 'for chunk in CompletionString' loop. Now we call it just once. llvm-svn: 162200
* [cindex.py] Add CachedProperty to CompletionChunkTobias Grosser2012-08-191-3/+3
| | | | | | Suggested by: Francisco Lopes <oblita@gmail.com> llvm-svn: 162191
* [clang.py] Add CachedProperty decoratorGregory Szorc2012-08-191-0/+25
| | | | | | It isn't used anywhere yet. llvm-svn: 162190
* [cindex.py] Use spaces, not tabs for indentationTobias Grosser2012-08-181-1/+1
| | | | | | Reported by: Francisco Lopes <oblita@gmail.com> llvm-svn: 162182
* [cindex.py] Dispose code completion results properlyTobias Grosser2012-08-181-1/+1
| | | | llvm-svn: 162181
* Comment XML: use xml:space="preserve" in Verbatim tags, so that XML tidy doesDmitri Gribenko2012-08-081-0/+3
| | | | | | not compress spaces in verbatim content. llvm-svn: 161531
* Comment AST: DeclInfo: add a special kind for enums.Dmitri Gribenko2012-08-071-0/+31
| | | | | | Comment XML: add a root node kind for enums. llvm-svn: 161442
* libclang API for comment-to-xml conversion.Dmitri Gribenko2012-08-071-0/+400
| | | | | | | | | | | | The implementation also includes a Relax NG schema and tests for the schema itself. The schema is used in c-index-test to verify that XML documents we produce are valid. In order to do the validation, we add an optional libxml2 dependency for c-index-test. Credits for CMake part go to Doug Gregor. Credits for Autoconf part go to Eric Christopher. Thanks! llvm-svn: 161431
* [clang.py] Implement Token APIGregory Szorc2012-07-126-16/+345
| | | | llvm-svn: 160111
* [clang.py] Add TranslationUnit.get_{file,source_location,source_range}Gregory Szorc2012-07-122-0/+127
| | | | llvm-svn: 160107
* [clang.py] Refactor how ctypes functions are registeredGregory Szorc2012-07-121-589/+569
| | | | llvm-svn: 160106
* [cindex.py] Make CompileCommand.arguments usage consistent with ↵Arnaud A. de Grandmaison2012-07-102-3/+5
| | | | | | | | CompileCommand.directory and the rest of the python binding Patch by David Röthlisberger llvm-svn: 159970
* [cindex.py] fix infinite iteration of compilation database CompileCommandsArnaud A. de Grandmaison2012-07-092-1/+9
| | | | | | Patch by David Röthlisberger llvm-svn: 159926
* [cindex.py] Fix erroneous comment for CompileCommandsArnaud A. de Grandmaison2012-07-061-3/+1
| | | | llvm-svn: 159810
* [libclang] CompilationDatabase naming and comment fixesArnaud A. de Grandmaison2012-07-031-9/+9
| | | | llvm-svn: 159682
* [cindex.py] Fix commentsArnaud A. de Grandmaison2012-06-302-2/+2
| | | | llvm-svn: 159492
* [cindex.py] add CompilationDatabase supportArnaud A. de Grandmaison2012-06-303-0/+251
| | | | llvm-svn: 159485
* [clang.py] Implement SourceLocation.from_offsetGregory Szorc2012-06-112-0/+23
| | | | llvm-svn: 158307
* [clang.py] Implement Cursor.is_static_methodGregory Szorc2012-06-092-0/+26
| | | | llvm-svn: 158277
OpenPOWER on IntegriCloud