blob: caee48d7683233277a0dbf4c1fd8cea65ce75ee5 [file] [log] [blame]
Argyrios Kyrtzidis0b9682e2014-02-25 03:59:23 +00001/*===-- clang-c/CXErrorCode.h - C Index Error Codes --------------*- C -*-===*\
2|* *|
3|* The LLVM Compiler Infrastructure *|
4|* *|
5|* This file is distributed under the University of Illinois Open Source *|
6|* License. See LICENSE.TXT for details. *|
7|* *|
8|*===----------------------------------------------------------------------===*|
9|* *|
10|* This header provides the CXErrorCode enumerators. *|
11|* *|
12\*===----------------------------------------------------------------------===*/
13
Benjamin Kramer2f5db8b2014-08-13 16:25:19 +000014#ifndef LLVM_CLANG_C_CXERRORCODE_H
15#define LLVM_CLANG_C_CXERRORCODE_H
Argyrios Kyrtzidis0b9682e2014-02-25 03:59:23 +000016
17#include "clang-c/Platform.h"
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23/**
Adrian Prantl9fc8faf2018-05-09 01:00:01 +000024 * Error codes returned by libclang routines.
Argyrios Kyrtzidis0b9682e2014-02-25 03:59:23 +000025 *
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 /**
Adrian Prantl9fc8faf2018-05-09 01:00:01 +000031 * No error.
Argyrios Kyrtzidis0b9682e2014-02-25 03:59:23 +000032 */
33 CXError_Success = 0,
34
35 /**
Adrian Prantl9fc8faf2018-05-09 01:00:01 +000036 * A generic error code, no further details are available.
Argyrios Kyrtzidis0b9682e2014-02-25 03:59:23 +000037 *
38 * Errors of this kind can get their own specific error codes in future
39 * libclang versions.
40 */
41 CXError_Failure = 1,
42
43 /**
Adrian Prantl9fc8faf2018-05-09 01:00:01 +000044 * libclang crashed while performing the requested operation.
Argyrios Kyrtzidis0b9682e2014-02-25 03:59:23 +000045 */
46 CXError_Crashed = 2,
47
48 /**
Adrian Prantl9fc8faf2018-05-09 01:00:01 +000049 * The function detected that the arguments violate the function
Argyrios Kyrtzidis0b9682e2014-02-25 03:59:23 +000050 * contract.
51 */
52 CXError_InvalidArguments = 3,
53
54 /**
Adrian Prantl9fc8faf2018-05-09 01:00:01 +000055 * An AST deserialization error has occurred.
Argyrios Kyrtzidis0b9682e2014-02-25 03:59:23 +000056 */
57 CXError_ASTReadError = 4
58};
59
60#ifdef __cplusplus
61}
62#endif
63#endif
64