xref: /llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/unused-invalid-parameter.cpp (revision 89a1d03e2b379e325daa5249411e414bbd995b5e)
1 // RUN: %check_clang_tidy -fix-errors %s misc-unused-parameters %t
2 
3 namespace GH56152 {
4 // There's no way to know whether the parameter is used or not if the parameter
5 // is an invalid declaration. Ensure the diagnostic is suppressed in this case.
func(unknown_type value)6 void func(unknown_type value) { // CHECK-MESSAGES: :[[@LINE]]:11: error: unknown type name 'unknown_type'
7   value += 1;
8 }
9 }
10 
11