From ac067454ad828f6cefe98fb3b02e84295396a495 Mon Sep 17 00:00:00 2001 From: Joao Matos Date: Mon, 3 Sep 2012 00:23:40 +0000 Subject: [PATCH] Added a new cursor for SEHLeaveStmt to libclang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163099 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang-c/Index.h | 4 +++- tools/libclang/CIndex.cpp | 2 ++ tools/libclang/CXCursor.cpp | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h index cf21d23668..a184714f82 100644 --- a/include/clang-c/Index.h +++ b/include/clang-c/Index.h @@ -1975,7 +1975,9 @@ enum CXCursorKind { */ CXCursor_DeclStmt = 231, - CXCursor_LastStmt = CXCursor_DeclStmt, + CXCursor_SEHLeaveStmt = 232, + + CXCursor_LastStmt = CXCursor_SEHLeaveStmt, /** * \brief Cursor that represents the translation unit itself. diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index ae488abf39..b2ca498b7c 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -3559,6 +3559,8 @@ CXString clang_getCursorKindSpelling(enum CXCursorKind Kind) { return createCXString("CXXForRangeStmt"); case CXCursor_SEHTryStmt: return createCXString("SEHTryStmt"); + case CXCursor_SEHLeaveStmt: + return createCXString("SEHLeaveStmt"); case CXCursor_SEHExceptStmt: return createCXString("SEHExceptStmt"); case CXCursor_SEHFinallyStmt: diff --git a/tools/libclang/CXCursor.cpp b/tools/libclang/CXCursor.cpp index e219f948ea..88a4e0db89 100644 --- a/tools/libclang/CXCursor.cpp +++ b/tools/libclang/CXCursor.cpp @@ -197,6 +197,10 @@ CXCursor cxcursor::MakeCXCursor(Stmt *S, Decl *Parent, CXTranslationUnit TU, K = CXCursor_SEHTryStmt; break; + case Stmt::SEHLeaveStmtClass: + K = CXCursor_SEHLeaveStmt; + break; + case Stmt::SEHExceptStmtClass: K = CXCursor_SEHExceptStmt; break; -- 2.40.0