24 lines · c
1// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -verify %s2 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 {{expected string literal as argument of 'function_return' attribute}}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