diff --git a/C++/C.sublime-syntax b/C++/C.sublime-syntax index 4d8ef4e3d8..20239f5e07 100644 --- a/C++/C.sublime-syntax +++ b/C++/C.sublime-syntax @@ -49,7 +49,7 @@ variables: declspec: '__declspec\(\s*\w+(?:\([^)]+\))?\s*\)' storage_classes: 'static|extern|register|thread_local|_Thread_local|constexpr|{{declspec}}' type_qualifier: 'const|volatile|_Atomic' - compiler_directive: 'inline|restrict|__restrict__|__restrict' + compiler_directive: 'inline|restrict|__restrict__|__restrict|_Noreturn|noreturn' modifiers: '{{storage_classes}}|{{type_qualifier}}|{{compiler_directive}}' non_func_keywords: 'if|for|switch|while|decltype|typeof|typeof_unqual|_Atomic|sizeof|alignof|_Alignof|static_assert|_Static_assert|__declspec|__attribute__' diff --git a/C++/syntax_test_c.c b/C++/syntax_test_c.c index a584de5c95..37b352f14e 100644 --- a/C++/syntax_test_c.c +++ b/C++/syntax_test_c.c @@ -361,6 +361,14 @@ void *null_pointer1 = NULL; void *null_pointer2 = nullptr; /* ^ constant.language.null */ +_Noreturn +/* <- storage.modifier */ +void foo(void) { abort(); } + +noreturn +/* <- storage.modifier */ +void bar(void) { abort(); } + FOOBAR hello() { /* <- meta.function entity.name.function */