CXErrorCode.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. /*===-- clang-c/CXErrorCode.h - C Index Error Codes --------------*- C -*-===*\
  7. |* *|
  8. |* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
  9. |* Exceptions. *|
  10. |* See https://llvm.org/LICENSE.txt for license information. *|
  11. |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
  12. |* *|
  13. |*===----------------------------------------------------------------------===*|
  14. |* *|
  15. |* This header provides the CXErrorCode enumerators. *|
  16. |* *|
  17. \*===----------------------------------------------------------------------===*/
  18. #ifndef LLVM_CLANG_C_CXERRORCODE_H
  19. #define LLVM_CLANG_C_CXERRORCODE_H
  20. #include "clang-c/ExternC.h"
  21. #include "clang-c/Platform.h"
  22. LLVM_CLANG_C_EXTERN_C_BEGIN
  23. /**
  24. * Error codes returned by libclang routines.
  25. *
  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. */
  29. enum CXErrorCode {
  30. /**
  31. * No error.
  32. */
  33. CXError_Success = 0,
  34. /**
  35. * A generic error code, no further details are available.
  36. *
  37. * Errors of this kind can get their own specific error codes in future
  38. * libclang versions.
  39. */
  40. CXError_Failure = 1,
  41. /**
  42. * libclang crashed while performing the requested operation.
  43. */
  44. CXError_Crashed = 2,
  45. /**
  46. * The function detected that the arguments violate the function
  47. * contract.
  48. */
  49. CXError_InvalidArguments = 3,
  50. /**
  51. * An AST deserialization error has occurred.
  52. */
  53. CXError_ASTReadError = 4
  54. };
  55. LLVM_CLANG_C_EXTERN_C_END
  56. #endif
  57. #ifdef __GNUC__
  58. #pragma GCC diagnostic pop
  59. #endif