xref: /freebsd/contrib/llvm-project/clang/include/clang-c/CXErrorCode.h (revision 5b27928474e6a4103d65b347544705c40c9618fd)
10b57cec5SDimitry Andric /*===-- clang-c/CXErrorCode.h - C Index Error Codes  --------------*- C -*-===*\
20b57cec5SDimitry Andric |*                                                                            *|
30b57cec5SDimitry Andric |* Part of the LLVM Project, under the Apache License v2.0 with LLVM          *|
40b57cec5SDimitry Andric |* Exceptions.                                                                *|
50b57cec5SDimitry Andric |* See https://llvm.org/LICENSE.txt for license information.                  *|
60b57cec5SDimitry Andric |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    *|
70b57cec5SDimitry Andric |*                                                                            *|
80b57cec5SDimitry Andric |*===----------------------------------------------------------------------===*|
90b57cec5SDimitry Andric |*                                                                            *|
100b57cec5SDimitry Andric |* This header provides the CXErrorCode enumerators.                          *|
110b57cec5SDimitry Andric |*                                                                            *|
120b57cec5SDimitry Andric \*===----------------------------------------------------------------------===*/
130b57cec5SDimitry Andric 
140b57cec5SDimitry Andric #ifndef LLVM_CLANG_C_CXERRORCODE_H
150b57cec5SDimitry Andric #define LLVM_CLANG_C_CXERRORCODE_H
160b57cec5SDimitry Andric 
17*480093f4SDimitry Andric #include "clang-c/ExternC.h"
180b57cec5SDimitry Andric #include "clang-c/Platform.h"
190b57cec5SDimitry Andric 
20*480093f4SDimitry Andric LLVM_CLANG_C_EXTERN_C_BEGIN
210b57cec5SDimitry Andric 
220b57cec5SDimitry Andric /**
230b57cec5SDimitry Andric  * Error codes returned by libclang routines.
240b57cec5SDimitry Andric  *
250b57cec5SDimitry Andric  * Zero (\c CXError_Success) is the only error code indicating success.  Other
260b57cec5SDimitry Andric  * error codes, including not yet assigned non-zero values, indicate errors.
270b57cec5SDimitry Andric  */
280b57cec5SDimitry Andric enum CXErrorCode {
290b57cec5SDimitry Andric   /**
300b57cec5SDimitry Andric    * No error.
310b57cec5SDimitry Andric    */
320b57cec5SDimitry Andric   CXError_Success = 0,
330b57cec5SDimitry Andric 
340b57cec5SDimitry Andric   /**
350b57cec5SDimitry Andric    * A generic error code, no further details are available.
360b57cec5SDimitry Andric    *
370b57cec5SDimitry Andric    * Errors of this kind can get their own specific error codes in future
380b57cec5SDimitry Andric    * libclang versions.
390b57cec5SDimitry Andric    */
400b57cec5SDimitry Andric   CXError_Failure = 1,
410b57cec5SDimitry Andric 
420b57cec5SDimitry Andric   /**
430b57cec5SDimitry Andric    * libclang crashed while performing the requested operation.
440b57cec5SDimitry Andric    */
450b57cec5SDimitry Andric   CXError_Crashed = 2,
460b57cec5SDimitry Andric 
470b57cec5SDimitry Andric   /**
480b57cec5SDimitry Andric    * The function detected that the arguments violate the function
490b57cec5SDimitry Andric    * contract.
500b57cec5SDimitry Andric    */
510b57cec5SDimitry Andric   CXError_InvalidArguments = 3,
520b57cec5SDimitry Andric 
530b57cec5SDimitry Andric   /**
540b57cec5SDimitry Andric    * An AST deserialization error has occurred.
550b57cec5SDimitry Andric    */
560b57cec5SDimitry Andric   CXError_ASTReadError = 4
570b57cec5SDimitry Andric };
580b57cec5SDimitry Andric 
59*480093f4SDimitry Andric LLVM_CLANG_C_EXTERN_C_END
60*480093f4SDimitry Andric 
610b57cec5SDimitry Andric #endif
620b57cec5SDimitry Andric 
63