[Clang] Added testcases for -Wunused-but-set-parameter

Clang now emits warnings for them after D122271 (shared logic with -Wunused-but-set-variable)
This commit is contained in:
Dávid Bolvanský 2022-03-23 22:14:27 +01:00
parent fcca10c69a
commit d90a3fcacd
1 changed files with 8 additions and 0 deletions

View File

@ -24,3 +24,11 @@ void f3(struct S s) { // expected-warning{{parameter 's' set but not used}}
struct S t;
s = t;
}
void f4(int j) { // expected-warning{{parameter 'j' set but not used}}
j++;
}
void f5(int k) { // expected-warning{{parameter 'k' set but not used}}
--k;
}