diff options
author | Stephane Moore <mog@google.com> | 2018-12-04 23:40:42 +0000 |
---|---|---|
committer | Stephane Moore <mog@google.com> | 2018-12-04 23:40:42 +0000 |
commit | f6d96e0f985cc1f69aeb8dfbf962e75e711fb163 (patch) | |
tree | 74ce0b1e7a81f5871d82281d9a557d83f62d29bb /clang-tools-extra/test | |
parent | d6bab09b4b6e81565167d83ed16e91cb65f1bfb7 (diff) | |
download | bcm5719-llvm-f6d96e0f985cc1f69aeb8dfbf962e75e711fb163.tar.gz bcm5719-llvm-f6d96e0f985cc1f69aeb8dfbf962e75e711fb163.zip |
[clang-tidy] Ignore namespaced and C++ member functions in google-objc-function-naming check 🙈
Summary: The google-objc-function-naming check applies to functions that are not namespaced and should not be applied to C++ member functions. Such function declarations should be ignored by the check to avoid false positives in Objective-C++ sources.
Reviewers: benhamilton, aaron.ballman
Reviewed By: aaron.ballman
Subscribers: xazax.hun, cfe-commits
Differential Revision: https://reviews.llvm.org/D55101
llvm-svn: 348317
Diffstat (limited to 'clang-tools-extra/test')
-rw-r--r-- | clang-tools-extra/test/clang-tidy/google-objc-function-naming.mm | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/google-objc-function-naming.mm b/clang-tools-extra/test/clang-tidy/google-objc-function-naming.mm new file mode 100644 index 00000000000..2e894575528 --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/google-objc-function-naming.mm @@ -0,0 +1,30 @@ +// RUN: %check_clang_tidy %s google-objc-function-naming %t + +void printSomething() {} +// CHECK-MESSAGES: :[[@LINE-1]]:6: warning: function name 'printSomething' not +// using function naming conventions described by Google Objective-C style guide + +void PrintSomething() {} +// CHECK-MESSAGES: :[[@LINE-1]]:6: warning: function name 'PrintSomething' not +// using function naming conventions described by Google Objective-C style guide + +void ABCBad_Name() {} +// CHECK-MESSAGES: :[[@LINE-1]]:6: warning: function name 'ABCBad_Name' not +// using function naming conventions described by Google Objective-C style guide + +namespace { + +int foo() { return 0; } + +} + +namespace bar { + +int convert() { return 0; } + +} + +class Baz { +public: + int value() { return 0; } +}; |