forked from OSchip/llvm-project
[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:
parent
fcca10c69a
commit
d90a3fcacd
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue