xref: /netbsd-src/external/apache2/llvm/dist/clang/include/clang-c/CXErrorCode.h (revision e038c9c4676b0f19b1b7dd08a940c6ed64a6d5ae)
17330f729Sjoerg /*===-- clang-c/CXErrorCode.h - C Index Error Codes  --------------*- C -*-===*\
27330f729Sjoerg |*                                                                            *|
37330f729Sjoerg |* Part of the LLVM Project, under the Apache License v2.0 with LLVM          *|
47330f729Sjoerg |* Exceptions.                                                                *|
57330f729Sjoerg |* See https://llvm.org/LICENSE.txt for license information.                  *|
67330f729Sjoerg |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    *|
77330f729Sjoerg |*                                                                            *|
87330f729Sjoerg |*===----------------------------------------------------------------------===*|
97330f729Sjoerg |*                                                                            *|
107330f729Sjoerg |* This header provides the CXErrorCode enumerators.                          *|
117330f729Sjoerg |*                                                                            *|
127330f729Sjoerg \*===----------------------------------------------------------------------===*/
137330f729Sjoerg 
147330f729Sjoerg #ifndef LLVM_CLANG_C_CXERRORCODE_H
157330f729Sjoerg #define LLVM_CLANG_C_CXERRORCODE_H
167330f729Sjoerg 
17*e038c9c4Sjoerg #include "clang-c/ExternC.h"
187330f729Sjoerg #include "clang-c/Platform.h"
197330f729Sjoerg 
20*e038c9c4Sjoerg LLVM_CLANG_C_EXTERN_C_BEGIN
217330f729Sjoerg 
227330f729Sjoerg /**
237330f729Sjoerg  * Error codes returned by libclang routines.
247330f729Sjoerg  *
257330f729Sjoerg  * Zero (\c CXError_Success) is the only error code indicating success.  Other
267330f729Sjoerg  * error codes, including not yet assigned non-zero values, indicate errors.
277330f729Sjoerg  */
287330f729Sjoerg enum CXErrorCode {
297330f729Sjoerg   /**
307330f729Sjoerg    * No error.
317330f729Sjoerg    */
327330f729Sjoerg   CXError_Success = 0,
337330f729Sjoerg 
347330f729Sjoerg   /**
357330f729Sjoerg    * A generic error code, no further details are available.
367330f729Sjoerg    *
377330f729Sjoerg    * Errors of this kind can get their own specific error codes in future
387330f729Sjoerg    * libclang versions.
397330f729Sjoerg    */
407330f729Sjoerg   CXError_Failure = 1,
417330f729Sjoerg 
427330f729Sjoerg   /**
437330f729Sjoerg    * libclang crashed while performing the requested operation.
447330f729Sjoerg    */
457330f729Sjoerg   CXError_Crashed = 2,
467330f729Sjoerg 
477330f729Sjoerg   /**
487330f729Sjoerg    * The function detected that the arguments violate the function
497330f729Sjoerg    * contract.
507330f729Sjoerg    */
517330f729Sjoerg   CXError_InvalidArguments = 3,
527330f729Sjoerg 
537330f729Sjoerg   /**
547330f729Sjoerg    * An AST deserialization error has occurred.
557330f729Sjoerg    */
567330f729Sjoerg   CXError_ASTReadError = 4
577330f729Sjoerg };
587330f729Sjoerg 
59*e038c9c4Sjoerg LLVM_CLANG_C_EXTERN_C_END
60*e038c9c4Sjoerg 
617330f729Sjoerg #endif
627330f729Sjoerg 
63