diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-07-01 13:24:05 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-07-01 13:24:05 +0000 | 
| commit | cf1b401909b5e54edfd80656b1a18eaa31f9f6f1 (patch) | |
| tree | edb0ffff2a43d84ba9b4c862b394cfeeebb36ddc /include/clang-c/Index.h | |
| parent | ef915aab0ac566c55bfb0d7a9f6635bb5d94d4af (diff) | |
Diffstat (limited to 'include/clang-c/Index.h')
| -rw-r--r-- | include/clang-c/Index.h | 69 | 
1 files changed, 68 insertions, 1 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h index 4241e43a9697..f404e6d72ec9 100644 --- a/include/clang-c/Index.h +++ b/include/clang-c/Index.h @@ -171,7 +171,60 @@ typedef struct CXVersion {     */    int Subminor;  } CXVersion; -   + +/** + * \brief Describes the exception specification of a cursor. + * + * A negative value indicates that the cursor is not a function declaration. + */ +enum CXCursor_ExceptionSpecificationKind { + +  /** +   * \brief The cursor has no exception specification. +   */ +  CXCursor_ExceptionSpecificationKind_None, + +  /** +   * \brief The cursor has exception specification throw() +   */ +  CXCursor_ExceptionSpecificationKind_DynamicNone, + +  /** +   * \brief The cursor has exception specification throw(T1, T2) +   */ +  CXCursor_ExceptionSpecificationKind_Dynamic, + +  /** +   * \brief The cursor has exception specification throw(...). +   */ +  CXCursor_ExceptionSpecificationKind_MSAny, + +  /** +   * \brief The cursor has exception specification basic noexcept. +   */ +  CXCursor_ExceptionSpecificationKind_BasicNoexcept, + +  /** +   * \brief The cursor has exception specification computed noexcept. +   */ +  CXCursor_ExceptionSpecificationKind_ComputedNoexcept, + +  /** +   * \brief The exception specification has not yet been evaluated. +   */ +  CXCursor_ExceptionSpecificationKind_Unevaluated, + +  /** +   * \brief The exception specification has not yet been instantiated. +   */ +  CXCursor_ExceptionSpecificationKind_Uninstantiated, + +  /** +   * \brief The exception specification has not been parsed yet. +   */ +  CXCursor_ExceptionSpecificationKind_Unparsed +}; +  /**   * \brief Provides a shared context for creating translation units.   * @@ -3471,6 +3524,13 @@ CINDEX_LINKAGE enum CXCallingConv clang_getFunctionTypeCallingConv(CXType T);  CINDEX_LINKAGE CXType clang_getResultType(CXType T);  /** + * \brief Retrieve the exception specification type associated with a function type. + * + * If a non-function type is passed in, an error code of -1 is returned. + */ +CINDEX_LINKAGE int clang_getExceptionSpecificationType(CXType T); + +/**   * \brief Retrieve the number of non-variadic parameters associated with a   * function type.   * @@ -3499,6 +3559,13 @@ CINDEX_LINKAGE unsigned clang_isFunctionTypeVariadic(CXType T);  CINDEX_LINKAGE CXType clang_getCursorResultType(CXCursor C);  /** + * \brief Retrieve the exception specification type associated with a given cursor. + * + * This only returns a valid result if the cursor refers to a function or method. + */ +CINDEX_LINKAGE int clang_getCursorExceptionSpecificationType(CXCursor C); + +/**   * \brief Return 1 if the CXType is a POD (plain old data) type, and 0   *  otherwise.   */  | 
