blob: fed195ec1f33db240ce5ecd7cf4fbb8bf99fa652 [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
17#include "clang-c/Platform.h"
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23/**
Andrew Scullcdfcccc2018-10-05 20:58:37 +010024 * Error codes returned by libclang routines.
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010025 *
26 * Zero (\c CXError_Success) is the only error code indicating success. Other
27 * error codes, including not yet assigned non-zero values, indicate errors.
28 */
29enum CXErrorCode {
30 /**
Andrew Scullcdfcccc2018-10-05 20:58:37 +010031 * No error.
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010032 */
33 CXError_Success = 0,
34
35 /**
Andrew Scullcdfcccc2018-10-05 20:58:37 +010036 * A generic error code, no further details are available.
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010037 *
38 * Errors of this kind can get their own specific error codes in future
39 * libclang versions.
40 */
41 CXError_Failure = 1,
42
43 /**
Andrew Scullcdfcccc2018-10-05 20:58:37 +010044 * libclang crashed while performing the requested operation.
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010045 */
46 CXError_Crashed = 2,
47
48 /**
Andrew Scullcdfcccc2018-10-05 20:58:37 +010049 * The function detected that the arguments violate the function
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010050 * contract.
51 */
52 CXError_InvalidArguments = 3,
53
54 /**
Andrew Scullcdfcccc2018-10-05 20:58:37 +010055 * An AST deserialization error has occurred.
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010056 */
57 CXError_ASTReadError = 4
58};
59
60#ifdef __cplusplus
61}
62#endif
63#endif
64