Commit Graph

13 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis cde7069ce4 [libclang] Make sure to visit the body of a CXXForRangeStmt.
llvm-svn: 221881
2014-11-13 09:50:19 +00:00
Argyrios Kyrtzidis 998912453d [liblang] Handle CXXForRangeStmt during AST visitation.
llvm-svn: 221874
2014-11-13 09:03:21 +00:00
Argyrios Kyrtzidis a2a1e53085 [libclang] Fixup the cursor spelling range for C++ destructors, operator overloads, and conversion functions.
Patch by Craig Tenenbaum!

llvm-svn: 216480
2014-08-26 20:23:26 +00:00
Argyrios Kyrtzidis 40bcfd71b6 When modifying an implicit instantiation with information from an explicit 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
2013-04-22 23:23:42 +00:00
Argyrios Kyrtzidis 2ec76747f4 [libclang] Fix cursor visitation to not ignore template arguments in out-of-line member functions.
rdar://13535645

llvm-svn: 178911
2013-04-05 21:04:10 +00:00
Argyrios Kyrtzidis fbb2bb5a3d [libclang/AST] When declaring a local class, don't neglect to set the end location
of the DeclStmt node, otherwise libclang will not work for anything inside that
class.

rdar://10837710

llvm-svn: 156966
2012-05-16 23:49:15 +00:00
Argyrios Kyrtzidis 0042b6f925 [libclang] Fix infinite loop when doing visitation of an OpaqueValueExpr.
llvm-svn: 145751
2011-12-03 03:49:47 +00:00
Argyrios Kyrtzidis 0fd8fae0a6 [libclang] Allow indexing/get-cursor/etc. for the exception variable in a C++ catch.
llvm-svn: 145750
2011-12-03 03:49:44 +00:00
Douglas Gregor 3f35bb2d15 Add a new libclang API to return a CXCompletionString for an arbitrary
cursor, from Connor Wakamo! Addresses <rdar://problem/9087798>.

llvm-svn: 136911
2011-08-04 20:04:59 +00:00
Argyrios Kyrtzidis d289104e29 [libclang] Avoid having the cursor of an expression replace the declaration 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
2011-06-27 19:42:23 +00:00
Douglas Gregor 30313cbb80 When libclang is walking a member access expression, don't walk into
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
2010-11-17 17:15:08 +00:00
Douglas Gregor 16443fdd31 Teach clang_getCursorReferenced() that a
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
2010-11-05 21:11:19 +00:00
Douglas Gregor 15417cfa56 Improve source-location information for CXXConstructExpr nodes, by
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
2010-11-03 00:35:38 +00:00