1 // RUN: %clang_cc1 -std=c11 -fsyntax-only -verify %s 2 // RUN: not %clang_cc1 -pedantic -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-EXT %s 3 4 _Noreturn int f(); 5 int _Noreturn f(); // expected-note {{previous}} 6 int f _Noreturn(); // expected-error {{expected ';'}} expected-error 2{{}} 7 int f() _Noreturn; // expected-error {{expected ';'}} expected-warning {{does not declare anything}} expected-error {{'_Noreturn' can only appear on functions}} 8 9 _Noreturn char c1; // expected-error {{'_Noreturn' can only appear on functions}} 10 char _Noreturn c2; // expected-error {{'_Noreturn' can only appear on functions}} 11 12 typedef _Noreturn int g(); // expected-error {{'_Noreturn' can only appear on functions}} 13 14 _Noreturn int; // expected-error {{'_Noreturn' can only appear on functions}} expected-warning {{does not declare anything}} 15 _Noreturn struct S; // expected-error {{'_Noreturn' can only appear on functions}} 16 _Noreturn enum E { e }; // expected-error {{'_Noreturn' can only appear on functions}} 17 18 // CHECK-EXT: _Noreturn functions are a C11-specific feature 19