[docs] Fix build-docs.sh
[llvm-project.git] / clang / lib / Headers / stdnoreturn.h
blob967be947627a02c11664e558887aebfe37820ed7
1 /*===---- stdnoreturn.h - Standard header for noreturn macro ---------------===
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 *===-----------------------------------------------------------------------===
8 */
10 #ifndef __STDNORETURN_H
11 #define __STDNORETURN_H
13 #define noreturn _Noreturn
14 #define __noreturn_is_defined 1
16 #if (defined(__STDC_VERSION__) && __STDC_VERSION__ > 201710L) && \
17 !defined(_CLANG_DISABLE_CRT_DEPRECATION_WARNINGS)
18 /* The noreturn macro is deprecated in C2x. We do not mark it as such because
19 including the header file in C2x is also deprecated and we do not want to
20 issue a confusing diagnostic for code which includes <stdnoreturn.h>
21 followed by code that writes [[noreturn]]. The issue with such code is not
22 with the attribute, or the use of 'noreturn', but the inclusion of the
23 header. */
24 /* FIXME: We should be issuing a deprecation warning here, but cannot yet due
25 * to system headers which include this header file unconditionally.
27 #endif
29 #endif /* __STDNORETURN_H */