1 // RUN: %clang_cc1 -fsyntax-only -verify %s
4 void f0() __attribute__((__noreturn__));
8 // Taking the address of a noreturn function
11 void (*fp1)() __attribute__((noreturn)) = f0;
14 // Taking the address of an overloaded noreturn function
15 void f0(int) __attribute__((__noreturn__));
19 void (*fp1)() __attribute__((noreturn)) = f0;
22 // No-returned function pointers
23 typedef void (* noreturn_fp)() __attribute__((noreturn));
25 void f3(noreturn_fp); // expected-note{{candidate function}}
29 f3(f2); // expected-error{{no matching function for call}}
34 int blah() __attribute__((noreturn));
38 return 3; // expected-warning {{function 'blah' declared 'noreturn' should not return}}