1 | // RUN: %check_clang_tidy %s misc-unused-parameters %t -- \ |
---|---|
2 | // RUN: -config="{CheckOptions: {misc-unused-parameters.IgnoreVirtual: true}}" -- |
3 | |
4 | struct Base { |
5 | int f(int foo) { |
6 | // CHECK-MESSAGES: :[[@LINE-1]]:13: warning: parameter 'foo' is unused [misc-unused-parameters] |
7 | // CHECK-FIXES: int f(int /*foo*/) { |
8 | return 5; |
9 | } |
10 | |
11 | virtual int f2(int foo) { |
12 | return 5; |
13 | } |
14 | }; |
15 | |
16 | struct Derived : Base { |
17 | int f2(int foo) override { |
18 | return 5; |
19 | } |
20 | }; |
21 |