summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/get-cursor.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [libclang] Stop assuming that the internal C++ ABI ↵Richard Smith2018-05-111-3/+7
| | | | | | ExceptionSpecificationType enumeration is the same as CXCursor_ExceptionSpecificationKind. llvm-svn: 332130
* Revert 320391: Certain targets are failing, pulling back to diagnose.Erich Keane2017-12-111-27/+27
| | | | llvm-svn: 320398
* For Linux/gnu compatibility, preinclude <stdc-predef.h> if the file is availableErich Keane2017-12-111-27/+27
| | | | | | | | | | | | | | | | | | | | As reported in llvm bugzilla 32377. Here’s a patch to add preinclude of stdc-predef.h. The gcc documentation says “On GNU/Linux, <stdc-predef.h> is pre-included.” See https://gcc.gnu.org/gcc-4.8/porting_to.html; The preinclude is inhibited with –ffreestanding. Basically I fixed the failing test cases by adding –ffreestanding which inhibits this behavior. I fixed all the failing tests, including some in extra/test, there's a separate patch for that which is linked here Note: this is a recommit after a test failure took down the original (r318669) Patch By: mibintc Differential Revision: https://reviews.llvm.org/D34158 llvm-svn: 320391
* Revert r318669/318694Erich Keane2017-11-201-26/+26
| | | | | | Broke some libclang tests, so reverting for now. llvm-svn: 318698
* For Linux/gnu compatibility, preinclude <stdc-predef.h> if the file is availableErich Keane2017-11-201-26/+26
| | | | | | | | | | | | | | | | | | | | | | As reported in llvm bugzilla 32377. Here’s a patch to add preinclude of stdc-predef.h. The gcc documentation says “On GNU/Linux, <stdc-predef.h> is pre-included.” See https://gcc.gnu.org/gcc-4.8/porting_to.html; The preinclude is inhibited with –ffreestanding. Basically I fixed the failing test cases by adding –ffreestanding which inhibits this behavior. I fixed all the failing tests, including some in extra/test, there's a separate patch for that which is linked here Patch By: mibintc Differential Revision: https://reviews.llvm.org/D34158 llvm-svn: 318669
* [libclang] Fix cursors for in-class initializer of field declarationsBenjamin Kramer2017-11-151-0/+8
| | | | | | | | | | Fixes PR33745. Patch by Nikolai Kosjar! Differential Revision: https://reviews.llvm.org/D40027 llvm-svn: 318292
* [libclang] Support for querying the exception specification type through ↵Jonathan Coe2017-06-271-2/+15
| | | | | | | | | | | | | | | | | | | libclang Summary: This patch exposes the exception specification type (noexcept, etc.) of a C++ function through libclang and Python clang.cindex. Reviewers: rsmith, aaron.ballman Reviewed By: aaron.ballman Subscribers: jbcoe, cfe-commits Differential Revision: https://reviews.llvm.org/D34091 Patch by Andrew Bennieston llvm-svn: 306483
* Fix for clang_Cursor_getSpellingNameRange()Kevin Funk2016-12-201-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fixes spelling name ranges for user-defined string literal operators. Example: constexpr int operator""_toint(unsigned long long val) { return int(val); } Before this patch the spelling name range on consisted of 'operator'. After this patch: 'operator""_toint'. Related to http://reviews.llvm.org/D5041, which fixes the function for other cursor kinds. Reviewers: akyrtzi, craigt, skalinichev, klimek, milianw, bkramer Subscribers: cfe-commits Tags: #clang-c Differential Revision: https://reviews.llvm.org/D18462 llvm-svn: 290172
* Expose cxx constructor and method properties through libclang and python ↵Jonathan Coe2016-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 267706
* [libclang] Make sure to visit the body of a CXXForRangeStmt.Argyrios Kyrtzidis2014-11-131-2/+5
| | | | llvm-svn: 221881
* [liblang] Handle CXXForRangeStmt during AST visitation.Argyrios Kyrtzidis2014-11-131-0/+13
| | | | llvm-svn: 221874
* [libclang] Fixup the cursor spelling range for C++ destructors, operator ↵Argyrios Kyrtzidis2014-08-261-0/+115
| | | | | | | | overloads, and conversion functions. Patch by Craig Tenenbaum! llvm-svn: 216480
* When modifying an implicit instantiation with information from an explicit ↵Argyrios Kyrtzidis2013-04-221-0/+13
| | | | | | | | | | one, make sure to reset the "right brace" location. Otherwise the source range of the explicit instantiation may become invalid (begin location will be after the end location). rdar://13706991 llvm-svn: 180070
* [libclang] Fix cursor visitation to not ignore template arguments in ↵Argyrios Kyrtzidis2013-04-051-0/+12
| | | | | | | | out-of-line member functions. rdar://13535645 llvm-svn: 178911
* [libclang/AST] When declaring a local class, don't neglect to set the end ↵Argyrios Kyrtzidis2012-05-161-0/+10
| | | | | | | | | | | location of the DeclStmt node, otherwise libclang will not work for anything inside that class. rdar://10837710 llvm-svn: 156966
* [libclang] Fix infinite loop when doing visitation of an OpaqueValueExpr.Argyrios Kyrtzidis2011-12-031-0/+4
| | | | llvm-svn: 145751
* [libclang] Allow indexing/get-cursor/etc. for the exception variable in a ↵Argyrios Kyrtzidis2011-12-031-0/+9
| | | | | | C++ catch. llvm-svn: 145750
* Add a new libclang API to return a CXCompletionString for an arbitraryDouglas Gregor2011-08-041-0/+12
| | | | | | cursor, from Connor Wakamo! Addresses <rdar://problem/9087798>. llvm-svn: 136911
* [libclang] Avoid having the cursor of an expression replace the declaration ↵Argyrios Kyrtzidis2011-06-271-0/+7
| | | | | | | | | | | | | | | cursor when the expression source range overlaps the declaration range. This can happen for C++ constructor expressions whose range generally include the variable declaration, e.g.: MyCXXClass foo; // Make sure pointing at 'foo' returns a VarDecl cursor. rdar://9124499. llvm-svn: 133930
* When libclang is walking a member access expression, don't walk intoDouglas Gregor2010-11-171-0/+30
| | | | | | | | an implicit "this"; it causes clang_getCursor() to find the implicit "this" expression (which isn't written in the source!) rather than the actual member. llvm-svn: 119516
* Teach clang_getCursorReferenced() that aDouglas Gregor2010-11-051-4/+7
| | | | | | | | CXXConstructorExpr/CXXTemporaryObjectExpr references the constructor it calls. Then, tweak clang_getCursor() to prefer such a call over a type reference to the type being called. llvm-svn: 118297
* Improve source-location information for CXXConstructExpr nodes, byDouglas Gregor2010-11-031-0/+30
ensuring that they cover all of their child nodes. There's still a clang_getCursor()-related issue with CXXFunctionalCastExprs with CXXConstructExprs as children (see FIXME in the test case); I'll look at that separately. llvm-svn: 118132
OpenPOWER on IntegriCloud