xref: /minix3/external/bsd/llvm/dist/clang/include/clang-c/CXErrorCode.h (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc /*===-- clang-c/CXErrorCode.h - C Index Error Codes  --------------*- C -*-===*\
2*0a6a1f1dSLionel Sambuc |*                                                                            *|
3*0a6a1f1dSLionel Sambuc |*                     The LLVM Compiler Infrastructure                       *|
4*0a6a1f1dSLionel Sambuc |*                                                                            *|
5*0a6a1f1dSLionel Sambuc |* This file is distributed under the University of Illinois Open Source      *|
6*0a6a1f1dSLionel Sambuc |* License. See LICENSE.TXT for details.                                      *|
7*0a6a1f1dSLionel Sambuc |*                                                                            *|
8*0a6a1f1dSLionel Sambuc |*===----------------------------------------------------------------------===*|
9*0a6a1f1dSLionel Sambuc |*                                                                            *|
10*0a6a1f1dSLionel Sambuc |* This header provides the CXErrorCode enumerators.                          *|
11*0a6a1f1dSLionel Sambuc |*                                                                            *|
12*0a6a1f1dSLionel Sambuc \*===----------------------------------------------------------------------===*/
13*0a6a1f1dSLionel Sambuc 
14*0a6a1f1dSLionel Sambuc #ifndef LLVM_CLANG_C_CXERRORCODE_H
15*0a6a1f1dSLionel Sambuc #define LLVM_CLANG_C_CXERRORCODE_H
16*0a6a1f1dSLionel Sambuc 
17*0a6a1f1dSLionel Sambuc #include "clang-c/Platform.h"
18*0a6a1f1dSLionel Sambuc 
19*0a6a1f1dSLionel Sambuc #ifdef __cplusplus
20*0a6a1f1dSLionel Sambuc extern "C" {
21*0a6a1f1dSLionel Sambuc #endif
22*0a6a1f1dSLionel Sambuc 
23*0a6a1f1dSLionel Sambuc /**
24*0a6a1f1dSLionel Sambuc  * \brief Error codes returned by libclang routines.
25*0a6a1f1dSLionel Sambuc  *
26*0a6a1f1dSLionel Sambuc  * Zero (\c CXError_Success) is the only error code indicating success.  Other
27*0a6a1f1dSLionel Sambuc  * error codes, including not yet assigned non-zero values, indicate errors.
28*0a6a1f1dSLionel Sambuc  */
29*0a6a1f1dSLionel Sambuc enum CXErrorCode {
30*0a6a1f1dSLionel Sambuc   /**
31*0a6a1f1dSLionel Sambuc    * \brief No error.
32*0a6a1f1dSLionel Sambuc    */
33*0a6a1f1dSLionel Sambuc   CXError_Success = 0,
34*0a6a1f1dSLionel Sambuc 
35*0a6a1f1dSLionel Sambuc   /**
36*0a6a1f1dSLionel Sambuc    * \brief A generic error code, no further details are available.
37*0a6a1f1dSLionel Sambuc    *
38*0a6a1f1dSLionel Sambuc    * Errors of this kind can get their own specific error codes in future
39*0a6a1f1dSLionel Sambuc    * libclang versions.
40*0a6a1f1dSLionel Sambuc    */
41*0a6a1f1dSLionel Sambuc   CXError_Failure = 1,
42*0a6a1f1dSLionel Sambuc 
43*0a6a1f1dSLionel Sambuc   /**
44*0a6a1f1dSLionel Sambuc    * \brief libclang crashed while performing the requested operation.
45*0a6a1f1dSLionel Sambuc    */
46*0a6a1f1dSLionel Sambuc   CXError_Crashed = 2,
47*0a6a1f1dSLionel Sambuc 
48*0a6a1f1dSLionel Sambuc   /**
49*0a6a1f1dSLionel Sambuc    * \brief The function detected that the arguments violate the function
50*0a6a1f1dSLionel Sambuc    * contract.
51*0a6a1f1dSLionel Sambuc    */
52*0a6a1f1dSLionel Sambuc   CXError_InvalidArguments = 3,
53*0a6a1f1dSLionel Sambuc 
54*0a6a1f1dSLionel Sambuc   /**
55*0a6a1f1dSLionel Sambuc    * \brief An AST deserialization error has occurred.
56*0a6a1f1dSLionel Sambuc    */
57*0a6a1f1dSLionel Sambuc   CXError_ASTReadError = 4
58*0a6a1f1dSLionel Sambuc };
59*0a6a1f1dSLionel Sambuc 
60*0a6a1f1dSLionel Sambuc #ifdef __cplusplus
61*0a6a1f1dSLionel Sambuc }
62*0a6a1f1dSLionel Sambuc #endif
63*0a6a1f1dSLionel Sambuc #endif
64*0a6a1f1dSLionel Sambuc 
65