1 | // RUN: %check_clang_tidy %s readability-non-const-parameter %t |
---|---|
2 | |
3 | static int f(); |
4 | |
5 | int 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 |