Lines Matching refs:unused
1 // RUN: %clang_cc1 -fsyntax-only -Wunused-parameter -Wused-but-marked-unused -Wunused -verify %s
5 #pragma unused(x)
6 #pragma unused(y, z)
8 int w; // expected-warning {{unused}}
9 #pragma unused w // expected-warning{{missing '(' after '#pragma unused' - ignoring}}
13 int x, y; // expected-warning {{unused}} expected-warning {{unused}}
14 #pragma unused(x,) // expected-warning{{expected '#pragma unused' argument to be a variable name}}
15 #pragma unused() // expected-warning{{expected '#pragma unused' argument to be a variable name}}
19 #pragma unused(x) // expected-warning{{undeclared variable 'x' used as an argument for '#pragma unused'}}
23 int w; // expected-warning {{unused}}
24 #pragma unused((w)) // expected-warning{{expected '#pragma unused' argument to be a variable name}}
30 #pragma unused(z) // no-warning
36 #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'}}
39 int f8(int x) { // expected-warning{{unused parameter 'x'}}
48 #pragma unused(x)
53 #pragma unused(x)
54 return x; // expected-warning{{'x' was marked unused but was used}}
59 #pragma unused(x) // expected-warning{{'x' was marked unused but was used}}
65 #pragma unused(glob_var)