1 // RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -verify %s 2 3 __attribute__((function_return("keep"))) void x(void) {} 4 5 // expected-warning@+1 {{'function_return' attribute argument not supported: thunk}} 6 __attribute__((function_return("thunk"))) void y(void) {} 7 8 // expected-warning@+1 {{'function_return' attribute argument not supported: thunk-inline}} 9 __attribute__((function_return("thunk-inline"))) void z(void) {} 10 11 __attribute__((function_return("thunk-extern"))) void w(void) {} 12 13 // expected-warning@+1 {{'function_return' attribute argument not supported: invalid}} 14 __attribute__((function_return("invalid"))) void v(void) {} 15 16 // expected-error@+1 {{'function_return' attribute requires a string}} 17 __attribute__((function_return(5))) void a(void) {} 18 19 // expected-error@+1 {{'function_return' attribute takes one argument}} 20 __attribute__((function_return)) void b(void) {} 21 22 // expected-warning@+1 {{'function_return' attribute only applies to functions}} 23 __attribute__((function_return)) int c; 24