[PATCH] D51575: [clang-tidy] Implement a clang-tidy check to verify Google Objective-C function naming conventions 📜

Yan Zhang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 4 13:13:13 PDT 2018


Wizard added inline comments.


================
Comment at: clang-tidy/google/FunctionNamingCheck.cpp:50
+
+void FunctionNamingCheck::registerMatchers(MatchFinder *Finder) {
+  // This check should only be applied to Objective-C sources.
----------------
Can we do some simple check to see if some easy fix can be provided just like `objc-property-declaration` check?
Something like `static bool isPositive` to `static bool IsPositive` and `static bool is_upper_camel` to `IsUpperCamel`. Such check can help provide code fix for a lot of  very common mistake at a low cost (i.e. if the naming pattern cannot be simply recognized, just provide no fix).


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51575





More information about the cfe-commits mailing list