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
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h
index fb74207..b112264 100644
--- a/include/clang-c/Index.h
+++ b/include/clang-c/Index.h
@@ -1000,7 +1000,6 @@
CXCursor_UsingDirective = 34,
/** \brief A using declaration. */
CXCursor_UsingDeclaration = 35,
-
CXCursor_FirstDecl = CXCursor_UnexposedDecl,
CXCursor_LastDecl = CXCursor_UsingDeclaration,
@@ -1036,11 +1035,28 @@
*/
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 @@
* 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.