diff --git a/libc/include/__llvm-libc-common.h b/libc/include/__llvm-libc-common.h --- a/libc/include/__llvm-libc-common.h +++ b/libc/include/__llvm-libc-common.h @@ -17,6 +17,9 @@ #undef __END_C_DECLS #define __END_C_DECLS } +#undef _Noreturn +#define _Noreturn [[noreturn]] + #else // not __cplusplus #undef __BEGIN_C_DECLS diff --git a/libc/spec/spec.td b/libc/spec/spec.td --- a/libc/spec/spec.td +++ b/libc/spec/spec.td @@ -48,6 +48,9 @@ def VoidPtr : PtrType; def SizeTType : NamedType<"size_t">; +// _Noreturn is really not a type, but it is convenient to treat it as a type. +def NoReturn : NamedType<"_Noreturn void">; + class Macro { string Name = name; }