1 // RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -verify %s 2 x(void)3__attribute__((function_return("keep"))) void x(void) {} 4 5 // expected-warning@+1 {{'function_return' attribute argument not supported: thunk}} y(void)6__attribute__((function_return("thunk"))) void y(void) {} 7 8 // expected-warning@+1 {{'function_return' attribute argument not supported: thunk-inline}} z(void)9__attribute__((function_return("thunk-inline"))) void z(void) {} 10 w(void)11__attribute__((function_return("thunk-extern"))) void w(void) {} 12 13 // expected-warning@+1 {{'function_return' attribute argument not supported: invalid}} v(void)14__attribute__((function_return("invalid"))) void v(void) {} 15 16 // expected-error@+1 {{expected string literal as argument of 'function_return' attribute}} a(void)17__attribute__((function_return(5))) void a(void) {} 18 19 // expected-error@+1 {{'function_return' attribute takes one argument}} b(void)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