1// RUN: %check_clang_tidy %s misc-unused-parameters %t -- \
2// RUN: -config="{CheckOptions: {misc-unused-parameters.IgnoreVirtual: true}}" --
3
4struct 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
16struct Derived : Base {
17 int f2(int foo) override {
18 return 5;
19 }
20};
21

source code of clang-tools-extra/test/clang-tidy/checkers/misc/unused-parameters-virtual.cpp