[PATCH] D55482: [clang-tidy] Improve google-objc-function-naming diagnostics 📙

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 10 08:14:32 PST 2018


aaron.ballman added inline comments.


================
Comment at: clang-tidy/google/FunctionNamingCheck.cpp:114-125
+  if (MatchedDecl->getStorageClass() == SC_Static) {
+    diag(MatchedDecl->getLocation(),
+         "static function name %0 must be in Pascal case as required by "
+         "Google Objective-C style guide")
+        << MatchedDecl << generateFixItHint(MatchedDecl);
+    return;
+  }
----------------
I'd rather see these diagnostics combined: `%select{static|global}1 function name %0 must %select{be in |have an appropriate prefixed followed by "}1 Pascal case as required by the Google Objective-C style guide` to simplify the logic (since `generateFixItHint()` already does the right thing).


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55482/new/

https://reviews.llvm.org/D55482





More information about the cfe-commits mailing list