| // RUN: %check_clang_tidy %s readability-redundant-function-ptr-dereference %t |
| // CHECK-MESSAGES: :[[@LINE-1]]:4: warning: redundant repeated dereference of function pointer [readability-redundant-function-ptr-dereference] |
| // CHECK-MESSAGES: :[[@LINE-1]]:4: warning: redundant repeated |
| // CHECK-MESSAGES: :[[@LINE-2]]:5: warning: redundant repeated |
| // CHECK-MESSAGES: :[[@LINE-3]]:6: warning: redundant repeated |
| // CHECK-MESSAGES: :[[@LINE-4]]:7: warning: redundant repeated |
| void invoke(const T& fn) { |
| // CHECK-MESSAGES: :[[@LINE-1]]:4: warning: redundant repeated |
| // CHECK-FIXES: fn(0); // 1 |
| // CHECK-FIXES: (fn)(0); // 2 |
| // FIXME: Remove unnecessary parentheses. |