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 | a93ab66331817caec3a52b9c24051390c7b1c600 (patch) | |
| tree | bf62fed0613afa49e451910e5ffc16d0ff010112 /clang/include/clang-c | |
| parent | 22fd29a94a418b1f62805d7bf2dee3131df3e452 (diff) | |
| download | bcm5719-llvm-a93ab66331817caec3a52b9c24051390c7b1c600.tar.gz bcm5719-llvm-a93ab66331817caec3a52b9c24051390c7b1c600.zip | |
Add libclang support for label statements, gotos, and taking the
address of a label (GNU extension).
llvm-svn: 113564
Diffstat (limited to 'clang/include/clang-c')
| -rw-r--r-- | clang/include/clang-c/Index.h | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index fb742078f4a..b112264c693 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/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. |

