diff options
author | Tareq A. Siraj <tareq.a.sriaj@intel.com> | 2013-04-16 18:53:08 +0000 |
---|---|---|
committer | Tareq A. Siraj <tareq.a.sriaj@intel.com> | 2013-04-16 18:53:08 +0000 |
commit | 051303ce09291dfbed537fa33b0d8a4d92c82b75 (patch) | |
tree | 009bdace0e61c4a9e4c25c9337551de59b007e3c /tools | |
parent | 85192c7fe187d5486e12dbc6960af28f16a558a0 (diff) |
Implement CapturedStmt AST
CapturedStmt can be used to implement generic function outlining as described in
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html.
CapturedStmt is not exposed to the C api.
Serialization and template support are pending.
Author: Wei Pan <wei.pan@intel.com>
Differential Revision: http://llvm-reviews.chandlerc.com/D370
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179615 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libclang/CXCursor.cpp | 4 | ||||
-rw-r--r-- | tools/libclang/RecursiveASTVisitor.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/tools/libclang/CXCursor.cpp b/tools/libclang/CXCursor.cpp index a413903f9a..edcc85b45e 100644 --- a/tools/libclang/CXCursor.cpp +++ b/tools/libclang/CXCursor.cpp @@ -270,6 +270,10 @@ CXCursor cxcursor::MakeCXCursor(const Stmt *S, const Decl *Parent, K = CXCursor_DeclStmt; break; + case Stmt::CapturedStmtClass: + K = CXCursor_UnexposedStmt; + break; + case Stmt::IntegerLiteralClass: K = CXCursor_IntegerLiteral; break; diff --git a/tools/libclang/RecursiveASTVisitor.h b/tools/libclang/RecursiveASTVisitor.h index 0312f1fbbd..592f168725 100644 --- a/tools/libclang/RecursiveASTVisitor.h +++ b/tools/libclang/RecursiveASTVisitor.h @@ -1839,7 +1839,7 @@ DEF_TRAVERSE_STMT(MSDependentExistsStmt, { DEF_TRAVERSE_STMT(ReturnStmt, { }) DEF_TRAVERSE_STMT(SwitchStmt, { }) DEF_TRAVERSE_STMT(WhileStmt, { }) - +DEF_TRAVERSE_STMT(CapturedStmt, { }) DEF_TRAVERSE_STMT(CXXDependentScopeMemberExpr, { TRY_TO(TraverseNestedNameSpecifierLoc(S->getQualifierLoc())); |