summaryrefslogtreecommitdiffstats
path: root/include/clang-c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-02-15 00:54:55 +0000
committerDouglas Gregor <dgregor@apple.com>2012-02-15 00:54:55 +0000
commit011d8b93b7cfa8492b8a9c909a850d6577e08dca (patch)
tree8b86e2607558775dca1b7ec3d5952cbda1e0602f /include/clang-c
parentf1c1d9a99dd02b2cd9c4052ec2ec759783175e5e (diff)
Implement indexing support for lambdas in libclang (both kinds), as
well as improving the RecursiveASTVisitor's walk of lambda expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150549 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang-c')
-rw-r--r--include/clang-c/Index.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h
index 0c6d6d1c76..018a316c89 100644
--- a/include/clang-c/Index.h
+++ b/include/clang-c/Index.h
@@ -1500,7 +1500,13 @@ enum CXCursorKind {
*/
CXCursor_OverloadedDeclRef = 49,
- CXCursor_LastRef = CXCursor_OverloadedDeclRef,
+ /**
+ * \brief A reference to a variable that occurs in some non-expression
+ * context, e.g., a C++ lambda capture list.
+ */
+ CXCursor_VariableRef = 50,
+
+ CXCursor_LastRef = CXCursor_VariableRef,
/* Error conditions */
CXCursor_FirstInvalid = 70,
@@ -1746,7 +1752,21 @@ enum CXCursorKind {
*/
CXCursor_SizeOfPackExpr = 143,
- CXCursor_LastExpr = CXCursor_SizeOfPackExpr,
+ /* \brief Represents a C++ lambda expression that produces a local function
+ * object.
+ *
+ * \code
+ * void abssort(float *x, unsigned N) {
+ * std::sort(x, x + N,
+ * [](float a, float b) {
+ * return std::abs(a) < std::abs(b);
+ * });
+ * }
+ * \endcode
+ */
+ CXCursor_LambdaExpr = 144,
+
+ CXCursor_LastExpr = CXCursor_LambdaExpr,
/* Statements */
CXCursor_FirstStmt = 200,