summaryrefslogtreecommitdiffstats
path: root/bindings
Commit message (Collapse)AuthorAgeFilesLines
* Enable support for __float128 in Clang and enable it on pertinent platformsNemanja Ivanovic2016-05-091-0/+1
| | | | | | | | | | | | | | | | | | | This patch corresponds to reviews: http://reviews.llvm.org/D15120 http://reviews.llvm.org/D19125 It adds support for the __float128 keyword, literals and target feature to enable it. Based on the latter of the two aforementioned reviews, this feature is enabled on Linux on i386/X86 as well as SystemZ. This is also the second attempt in commiting this feature. The first attempt did not enable it on required platforms which caused failures when compiling type_traits with -std=gnu++11. If you see failures with compiling this header on your platform after this commit, it is likely that your platform needs to have this feature enabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268898 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Expose the ElaboratedTypeSergey Kalinichev2016-05-031-0/+12
| | | | | | | Differential Revision: http://reviews.llvm.org/D11797 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268366 91177308-0d34-0410-b5e6-96231b3b80d8
* python: add bindings for children of diagnosticsSaleem Abdulrasool2016-04-302-0/+44
| | | | | | | | | | | | | This exposes the Clang API bindings clang_getChildDiagnostics (which returns a CXDiagnosticSet) and clang_getNumDiagnosticsInSet / clang_getDiagnosticInSet (to traverse the CXDiagnosticSet), and adds a helper children property in the Python Diagnostic wrapper. Also, this adds the missing OVERLOAD_CANDIDATE (700) cursor type. Patch by Hanson Wang! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268167 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose cxx constructor and method properties through libclang and python ↵Jonathan Coe2016-04-272-0/+128
| | | | | | | | | | | | | | | | | | | | | | | bindings. Summary: I have exposed the following function through libclang and the clang.cindex python bindings: clang_CXXConstructor_isConvertingConstructor, clang_CXXConstructor_isCopyConstructor, clang_CXXConstructor_isDefaultConstructor, clang_CXXConstructor_isMoveConstructor, clang_CXXMethod_isDefaulted I need (some of) these methods for a C++ code model I am building in Python to drive a code generator. Reviewers: compnerd, skalinichev Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15469 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267706 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 266186 as it breaks anything that includes type_traits on some platformsNemanja Ivanovic2016-04-151-1/+0
| | | | | | | | | | | Since this patch provided support for the __float128 type but disabled it on all platforms by default, some platforms can't compile type_traits with -std=gnu++11 since there is a specialization with __float128. This reverts the patch until D19125 is approved (i.e. we know which platforms need this support enabled). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266460 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable support for __float128 in ClangNemanja Ivanovic2016-04-131-0/+1
| | | | | | | | | | | | | | | | | This patch corresponds to review: http://reviews.llvm.org/D15120 It adds support for the __float128 keyword, literals and a target feature to enable it. This support is disabled by default on all targets and any target that has support for this type is free to add it. Based on feedback that I've received from target maintainers, this appears to be the right thing for most targets. I have not heard from the maintainers of X86 which I believe supports this type. I will subsequently investigate the impact of enabling this on X86. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266186 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang python bindings: Fix for bug 26394Jonathan Coe2016-03-101-1/+1
| | | | | | | | | | | Summary: https://llvm.org/bugs/show_bug.cgi?id=26394 reports that clang's python bindings tests are failing. I can confirm that the bug exists and that the proposed fix is good. Differential Revision: http://reviews.llvm.org/D17226 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263170 91177308-0d34-0410-b5e6-96231b3b80d8
* python binding: expose compile command filenameGuillaume Papin2016-03-072-5/+22
| | | | | | | | Reviewers: compnerd, skalinichev Differential Revision: http://reviews.llvm.org/D17278 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262845 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang: expose dllexport, dllimport attributesSaleem Abdulrasool2015-12-101-0/+3
| | | | | | | These attributes were previously unexposed. Expose them through the libclang interfaces. Add tests that cover both the MSVC spelling and the GNU spelling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255273 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Visit TypeAliasTemplateDeclSergey Kalinichev2015-11-152-1/+3
| | | | | | | | | This makes TypeAliasTemplateDecl accessible via LibClang and python bindings Differential Revision: http://reviews.llvm.org/D13844 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253166 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Expose AutoTypeSergey Kalinichev2015-11-151-0/+1
| | | | | | | | | Expose the AutoType via LibClang and python bindings Differential Revision: http://reviews.llvm.org/D13000 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253165 91177308-0d34-0410-b5e6-96231b3b80d8
* Index: expose is_mutable_fieldSaleem Abdulrasool2015-10-272-0/+25
| | | | | | | | Expose isMutable via libClang and python bindings. Patch by Jonathan B Coe! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251410 91177308-0d34-0410-b5e6-96231b3b80d8
* bindings: add new C++ function attribute accessorsSaleem Abdulrasool2015-10-122-0/+67
| | | | | | | | | Add methods to index Cursor to see if a cxx method is pure_virtual, virtual or const methods. Patch by Jonathan B Coe! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250008 91177308-0d34-0410-b5e6-96231b3b80d8
* Index: expose visibility attributeSaleem Abdulrasool2015-09-051-0/+2
| | | | | | | Expose the previously unexposed visibility attribute via the python and C bindings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246931 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Return deduced type for auto type, not the one written in the source.Manuel Klimek2015-09-031-2/+2
| | | | | | | | | | | | It used to work, but was accidentally broken by r179769. The issue with decayed types was fixed by r190796. So this patch partially reverts r179769, and adds more tests. This also fixes PR 18669. Patch by Sergey Kalinichev. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246778 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Add functions to get information about fields.Argyrios Kyrtzidis2015-04-132-6/+55
| | | | | | Patch by Loïc Jaquemet! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234762 91177308-0d34-0410-b5e6-96231b3b80d8
* This reverts commit r227432, r227438 and r227448.Rafael Espindola2015-01-292-55/+6
| | | | | | | | | | | | | | | | | | | | | | | It should bring the bots back. Original messagses: r227448: Remove unnecessary default. r227438: Fix Index/print-type.cpp test following r227432. r227432: libclang: Add three functions useful for dealing with anonymous fields: clang_Cursor_getOffsetOfField clang_Cursor_isAnonymous clang_Type_visitFields Python: Add corresponding methods for dealing with anonymous fields. Patch by Loïc Jaquemet git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227472 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang: Add three functions useful for dealing with anonymous fields:Francois Pichet2015-01-292-6/+55
| | | | | | | | | | | clang_Cursor_getOffsetOfField clang_Cursor_isAnonymous clang_Type_visitFields Python: Add corresponding methods for dealing with anonymous fields. Patch by Loïc Jaquemet git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227432 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Add function to retrieve storage class in libclang.Argyrios Kyrtzidis2014-10-151-0/+61
| | | | | | | Patch by guibufolo! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219809 91177308-0d34-0410-b5e6-96231b3b80d8
* Add libclang capabilities to retriete template arguments from specializations.Eli Bendersky2014-10-102-106/+142
| | | | | | | | | | | Includes Python bindings. Reviewed in http://reviews.llvm.org/D5621 Patch by Rob Springer git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219529 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215208 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose the name mangling C API to Python bindings.Eli Bendersky2014-08-052-0/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214930 91177308-0d34-0410-b5e6-96231b3b80d8
* Reformat docstring to 80-colEli Bendersky2014-07-311-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214412 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211482 91177308-0d34-0410-b5e6-96231b3b80d8
* 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209793 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209767 91177308-0d34-0410-b5e6-96231b3b80d8
* Trim trailing whitespace in cindex.pyEli Bendersky2014-05-281-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209754 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209316 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up language and grammar.Eric Christopher2014-05-201-2/+2
| | | | | | | Based on a patch by jfcaron3@gmail.com! PR19806 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209215 91177308-0d34-0410-b5e6-96231b3b80d8
* cindex-dump.py: fix the --show-ids description stringAlp Toker2014-05-051-1/+1
| | | | | | It looks like this was botched back in r94936. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207947 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207946 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Add attribute support for 'pure', 'const' and 'noduplicate'.Joey Gouly2014-05-011-0/+3
| | | | | | | This bumps CINDEX_VERSION_MINOR up (to 26). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207767 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207712 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the method len of the CompletionString object. Patch by Christopher GreeneSylvestre Ledru2014-04-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207348 91177308-0d34-0410-b5e6-96231b3b80d8
* 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! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207173 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206882 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206712 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the correct symbol for a left bracket.Bill Wendling2014-03-141-1/+1
| | | | | | PR19089 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203906 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang/python] Use a Python standard library module to create a temporary ↵Argyrios Kyrtzidis2014-02-201-9/+2
| | | | | | | | file. Patch by Brian Gesiak! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201762 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang/python] Add CompilationDatabase.getAllCompileCommands to the ↵Argyrios Kyrtzidis2013-12-202-0/+34
| | | | | | | | python bindings. Patch by Laszlo Nagy! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197765 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a tranche of comment, test and doc typosAlp Toker2013-12-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196510 91177308-0d34-0410-b5e6-96231b3b80d8
* Documentation parsing: add support for \throws \throw \exception commandsDmitri Gribenko2013-11-121-1/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194521 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang/python] Add __contains__ to SourceRange class.Argyrios Kyrtzidis2013-10-311-0/+23
| | | | | | Patch by Loïc Jaquemet! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193725 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Introduce clang_Type_getCXXRefQualifier whichexposes ↵Argyrios Kyrtzidis2013-10-111-5/+60
| | | | | | | | ref-qualifier information of function type. Patch by Che-Liang Chiou! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192493 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Add some tests by Loïc Jaquemet that I forgot to add earlier.Argyrios Kyrtzidis2013-10-071-0/+40
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192108 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] python: expose a few functions, patch by Loïc Jaquemet!Argyrios Kyrtzidis2013-10-032-0/+46
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191907 91177308-0d34-0410-b5e6-96231b3b80d8
* [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! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191906 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] python: fix return type of clang_Type_getSizeOf().Argyrios Kyrtzidis2013-09-251-1/+1
| | | | | | Patch by Loïc Jaquemet! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191346 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Provide location for attributes and expose 'packed' attribute.Argyrios Kyrtzidis2013-09-251-0/+1
| | | | | | Patch by Loïc Jaquemet! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191345 91177308-0d34-0410-b5e6-96231b3b80d8
* [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! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190796 91177308-0d34-0410-b5e6-96231b3b80d8