CXErrorCode.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*===-- 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. #ifndef LLVM_CLANG_C_CXERRORCODE_H
  14. #define LLVM_CLANG_C_CXERRORCODE_H
  15. #include "clang-c/Platform.h"
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. /**
  20. * \brief Error codes returned by libclang routines.
  21. *
  22. * Zero (\c CXError_Success) is the only error code indicating success. Other
  23. * error codes, including not yet assigned non-zero values, indicate errors.
  24. */
  25. enum CXErrorCode {
  26. /**
  27. * \brief No error.
  28. */
  29. CXError_Success = 0,
  30. /**
  31. * \brief A generic error code, no further details are available.
  32. *
  33. * Errors of this kind can get their own specific error codes in future
  34. * libclang versions.
  35. */
  36. CXError_Failure = 1,
  37. /**
  38. * \brief libclang crashed while performing the requested operation.
  39. */
  40. CXError_Crashed = 2,
  41. /**
  42. * \brief The function detected that the arguments violate the function
  43. * contract.
  44. */
  45. CXError_InvalidArguments = 3,
  46. /**
  47. * \brief An AST deserialization error has occurred.
  48. */
  49. CXError_ASTReadError = 4
  50. };
  51. #ifdef __cplusplus
  52. }
  53. #endif
  54. #endif