1 | // RUN: %check_clang_tidy %s google-objc-function-naming %t |
2 | |
3 | void printSomething() {} |
4 | // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: function in global namespace named |
5 | // 'printSomething' must have an appropriate prefix followed by Pascal case as |
6 | // required by Google Objective-C style guide |
7 | |
8 | void PrintSomething() {} |
9 | // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: function in global namespace named |
10 | // 'PrintSomething' must have an appropriate prefix followed by Pascal case as |
11 | // required by Google Objective-C style guide |
12 | |
13 | void ABCBad_Name() {} |
14 | // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: function in global namespace named |
15 | // 'ABCBad_Name' must have an appropriate prefix followed by Pascal case as |
16 | // required by Google Objective-C style guide |
17 | |
18 | namespace { |
19 | |
20 | int foo() { return 0; } |
21 | |
22 | } |
23 | |
24 | namespace bar { |
25 | |
26 | int convert() { return 0; } |
27 | |
28 | } |
29 | |
30 | class Baz { |
31 | public: |
32 | int value() { return 0; } |
33 | }; |
34 | |