diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-09-10 00:22:18 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-09-10 00:22:18 +0000 |
commit | 36897b05ca2886e287f01802614bc10cbadcec22 (patch) | |
tree | 8b056b86a6bf3b0a96ce17cd870e5bc4773a0f09 /include/clang-c | |
parent | fa2e26f62162d90a3d117e58d6b1f47e40377987 (diff) |
Add libclang support for label statements, gotos, and taking the
address of a label (GNU extension).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113564 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang-c')
-rw-r--r-- | include/clang-c/Index.h | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h index fb742078f4..b112264c69 100644 --- a/include/clang-c/Index.h +++ b/include/clang-c/Index.h @@ -1000,7 +1000,6 @@ enum CXCursorKind { CXCursor_UsingDirective = 34, /** \brief A using declaration. */ CXCursor_UsingDeclaration = 35, - CXCursor_FirstDecl = CXCursor_UnexposedDecl, CXCursor_LastDecl = CXCursor_UsingDeclaration, @@ -1036,11 +1035,28 @@ enum CXCursorKind { */ CXCursor_NamespaceRef = 46, /** - * A reference to a member of a struct, union, or class that occurs in some - * non-expression context, e.g., a designated initializer. + * \brief A reference to a member of a struct, union, or class that occurs in + * some non-expression context, e.g., a designated initializer. */ CXCursor_MemberRef = 47, - CXCursor_LastRef = CXCursor_MemberRef, + /** + * \brief A reference to a labeled statement. + * + * This cursor kind is used to describe the jump to "start_over" in the + * goto statement in the following example: + * + * \code + * start_over: + * ++counter; + * + * goto start_over; + * \endcode + * + * A label reference cursor refers to a label statement. + */ + CXCursor_LabelRef = 48, + + CXCursor_LastRef = CXCursor_LabelRef, /* Error conditions */ CXCursor_FirstInvalid = 70, @@ -1100,7 +1116,21 @@ enum CXCursorKind { * reported. */ CXCursor_UnexposedStmt = 200, - CXCursor_LastStmt = 200, + + /** \brief A labelled statement in a function. + * + * This cursor kind is used to describe the "start_over:" label statement in + * the following example: + * + * \code + * start_over: + * ++counter; + * \endcode + * + */ + CXCursor_LabelStmt = 201, + + CXCursor_LastStmt = CXCursor_LabelStmt, /** * \brief Cursor that represents the translation unit itself. |