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

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 2 23:30:18 PDT 2018


hokein added a comment.

Nice! looks mostly good to me.



================
Comment at: clang-tidy/google/FunctionNamingCheck.cpp:57
+      functionDecl(
+          isDefinition(),
+          unless(anyOf(isMain(), matchesName(validFunctionNameRegex(true)),
----------------
any reason why we restrict to definitions only? I think we can consider declarations too.


================
Comment at: unittests/clang-tidy/GoogleModuleTest.cpp:109
 
+TEST(ObjCFunctionNaming, AllowedStaticFunctionName) {
+  std::vector<ClangTidyError> Errors;
----------------
nit: we don't need unittest for the check here, as it is well covered in the littest.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51575





More information about the cfe-commits mailing list