31 lines · cpp
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 6namespace SomeNamespace {7namespace Inner {8 9class SomeClass {10public: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};16template <typename T>17int SomeClass::someMethod() {18// CHECK-FIXES: int SomeClass::SomeMethod() {19 return 5;20}21 22} // namespace Inner23 24void someFunc() {25 Inner::SomeClass S;26 S.someMethod<int>();27// CHECK-FIXES: S.SomeMethod<int>();28}29 30} // namespace SomeNamespace31