blob: b3a0b9d66d5f8bbf808e57675b077128f5426ecd [file] [log] [blame]
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01001/*===-- clang-c/CXErrorCode.h - C Index Error Codes --------------*- C -*-===*\
2|* *|
Andrew Walbran16937d02019-10-22 13:54:20 +01003|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
4|* Exceptions. *|
5|* See https://llvm.org/LICENSE.txt for license information. *|
6|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01007|* *|
8|*===----------------------------------------------------------------------===*|
9|* *|
10|* This header provides the CXErrorCode enumerators. *|
11|* *|
12\*===----------------------------------------------------------------------===*/
13
14#ifndef LLVM_CLANG_C_CXERRORCODE_H
15#define LLVM_CLANG_C_CXERRORCODE_H
16
Olivier Deprezf4ef2d02021-04-20 13:36:24 +020017#include "clang-c/ExternC.h"
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010018#include "clang-c/Platform.h"
19
Olivier Deprezf4ef2d02021-04-20 13:36:24 +020020LLVM_CLANG_C_EXTERN_C_BEGIN
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010021
22/**
Andrew Scullcdfcccc2018-10-05 20:58:37 +010023 * Error codes returned by libclang routines.
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010024 *
25 * Zero (\c CXError_Success) is the only error code indicating success. Other
26 * error codes, including not yet assigned non-zero values, indicate errors.
27 */
28enum CXErrorCode {
29 /**
Andrew Scullcdfcccc2018-10-05 20:58:37 +010030 * No error.
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010031 */
32 CXError_Success = 0,
33
34 /**
Andrew Scullcdfcccc2018-10-05 20:58:37 +010035 * A generic error code, no further details are available.
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010036 *
37 * Errors of this kind can get their own specific error codes in future
38 * libclang versions.
39 */
40 CXError_Failure = 1,
41
42 /**
Andrew Scullcdfcccc2018-10-05 20:58:37 +010043 * libclang crashed while performing the requested operation.
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010044 */
45 CXError_Crashed = 2,
46
47 /**
Andrew Scullcdfcccc2018-10-05 20:58:37 +010048 * The function detected that the arguments violate the function
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010049 * contract.
50 */
51 CXError_InvalidArguments = 3,
52
53 /**
Andrew Scullcdfcccc2018-10-05 20:58:37 +010054 * An AST deserialization error has occurred.
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010055 */
56 CXError_ASTReadError = 4
57};
58
Olivier Deprezf4ef2d02021-04-20 13:36:24 +020059LLVM_CLANG_C_EXTERN_C_END
60
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010061#endif
62