12 lines · c
1// RUN: %check_clang_tidy -std=c99,c11,c17 %s readability-non-const-parameter %t2 3static int f();4 5int f(p)6 int *p;7// CHECK-MESSAGES: :[[@LINE-1]]:8: warning: pointer parameter 'p' can be pointer to const [readability-non-const-parameter]8// CHECK-FIXES: const int *p;9{10 return *p;11}12