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