| 1 | // RUN: %check_clang_tidy %s readability-identifier-naming %t -std=c++20 \ |
| 2 | // RUN: --config='{CheckOptions: { \ |
| 3 | // RUN: readability-identifier-naming.MethodCase: CamelCase, \ |
| 4 | // RUN: }}' |
| 5 | |
| 6 | namespace SomeNamespace { |
| 7 | namespace Inner { |
| 8 | |
| 9 | class SomeClass { |
| 10 | public: |
| 11 | template <typename T> |
| 12 | int someMethod(); |
| 13 | // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: invalid case style for method 'someMethod' [readability-identifier-naming] |
| 14 | // CHECK-FIXES: int SomeMethod(); |
| 15 | }; |
| 16 | template <typename T> |
| 17 | int SomeClass::someMethod() { |
| 18 | // CHECK-FIXES: int SomeClass::SomeMethod() { |
| 19 | return 5; |
| 20 | } |
| 21 | |
| 22 | } // namespace Inner |
| 23 | |
| 24 | void someFunc() { |
| 25 | Inner::SomeClass S; |
| 26 | S.someMethod<int>(); |
| 27 | // CHECK-FIXES: S.SomeMethod<int>(); |
| 28 | } |
| 29 | |
| 30 | } // namespace SomeNamespace |
| 31 | |