aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorStephane Moore <mog@google.com>2018-11-17 02:37:21 +0000
committerStephane Moore <mog@google.com>2018-11-17 02:37:21 +0000
commite34a761d5b2b71a4a79a5ce05ce2af5f11a16a64 (patch)
tree81e0da3df04a3dd3499f5f59359671e5a434fd9a /llvm/tools/llvm-objdump/llvm-objdump.cpp
parentdd61f1164223ff56cd07de0ef98e1cf49e6e653e (diff)
downloadllvm-e34a761d5b2b71a4a79a5ce05ce2af5f11a16a64.zip
llvm-e34a761d5b2b71a4a79a5ce05ce2af5f11a16a64.tar.gz
llvm-e34a761d5b2b71a4a79a5ce05ce2af5f11a16a64.tar.bz2
[clang-tidy/checks] Implement a clang-tidy check to verify Google Objective-C function naming conventions 📜
Summary: §1 Description This check finds function names in function declarations in Objective-C files that do not follow the naming pattern described in the Google Objective-C Style Guide. Function names should be in UpperCamelCase and functions that are not of static storage class should have an appropriate prefix as described in the Google Objective-C Style Guide. The function `main` is a notable exception. Function declarations in expansions in system headers are ignored. Example conforming function definitions: ``` static bool IsPositive(int i) { return i > 0; } static bool ABIsPositive(int i) { return i > 0; } bool ABIsNegative(int i) { return i < 0; } ``` A fixit hint is generated for functions of static storage class but otherwise the check does not generate a fixit hint because an appropriate prefix for the function cannot be determined. §2 Test Notes * Verified clang-tidy tests pass successfully. * Used check_clang_tidy.py to verify expected output of processing google-objc-function-naming.m Reviewers: benhamilton, hokein, Wizard, aaron.ballman Reviewed By: benhamilton Subscribers: Eugene.Zelenko, mgorny, xazax.hun, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D51575 llvm-svn: 347132
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions