diff options
| author | Douglas Gregor <dgregor@apple.com> | 2012-02-15 00:54:55 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2012-02-15 00:54:55 +0000 |
| commit | 3009383b9f3c4dd66a52684d33dedc654760c0a0 (patch) | |
| tree | 38d244709e5f555d23f0592e75e7359c4879396c /clang/include/clang-c | |
| parent | fdc06e32cf35feb454ea2228277b2e62c040a552 (diff) | |
| download | bcm5719-llvm-3009383b9f3c4dd66a52684d33dedc654760c0a0.tar.gz bcm5719-llvm-3009383b9f3c4dd66a52684d33dedc654760c0a0.zip | |
Implement indexing support for lambdas in libclang (both kinds), as
well as improving the RecursiveASTVisitor's walk of lambda
expressions.
llvm-svn: 150549
Diffstat (limited to 'clang/include/clang-c')
| -rw-r--r-- | clang/include/clang-c/Index.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index 0c6d6d1c762..018a316c894 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/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, |

