// RUN: %clang_cc1 -fsyntax-only -Wunused-parameter -Wused-but-marked-unused -Wunused -verify %s
voidf1(void){int x, y, z;#pragma unused(x)
#pragma unused(y, z)
int w;// expected-warning {{unused}}
#pragma unused w // expected-warning{{missing '(' after '#pragma unused' - ignoring}}}voidf2(void){int x, y;// expected-warning {{unused}} expected-warning {{unused}}
#pragma unused(x,) // expected-warning{{expected '#pragma unused' argument to be a variable name}}#pragma unused() // expected-warning{{expected '#pragma unused' argument to be a variable name}}}voidf3(void){#pragma unused(x) // expected-warning{{undeclared variable 'x' used as an argument for '#pragma unused'}}}voidf4(void){int w;// expected-warning {{unused}}
#pragma unused((w)) // expected-warning{{expected '#pragma unused' argument to be a variable name}}}voidf6(void){int z;// no-warning
{#pragma unused(z) // no-warning}}voidf7(void){int y;#pragma unused(undeclared, undefined, y) // expected-warning{{undeclared variable 'undeclared' used as an argument for '#pragma unused'}} expected-warning{{undeclared variable 'undefined' used as an argument for '#pragma unused'}}}intf8(intx){// expected-warning{{unused parameter 'x'}}
return0;}intf9(intx){return x;}intf10(intx){#pragma unused(x)
return0;}intf11(intx){#pragma unused(x)
return x;// expected-warning{{'x' was marked unused but was used}}
}intf12(intx){int y = x;#pragma unused(x) // expected-warning{{'x' was marked unused but was used}}return y;}// rdar://8793832
staticint glob_var =0;#pragma unused(glob_var)