This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE349123: [clang-tidy] Improve google-objc-function-naming
diagnostics 📙 (authored by stephanemoore, committed by ).
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.
benhamilton added inline comments.
Comment at: clang-tidy/google/FunctionNamingCheck.cpp:115
diag(MatchedDecl->getLocation(),
- "function name %0 not using function naming conventions described by "
- "Google Objective-C style guide")
- << MatchedDecl << gener
stephanemoore updated this revision to Diff 177795.
stephanemoore marked 5 inline comments as done.
stephanemoore added a comment.
Changes:
• Drop const on local bool variable.
• Adopt the term "function in global namespace" in diagnostic messages.
CHANGES SINCE LAST ACTION
https://reviews.llv
stephanemoore added inline comments.
Comment at: clang-tidy/google/FunctionNamingCheck.cpp:115
diag(MatchedDecl->getLocation(),
- "function name %0 not using function naming conventions described by "
- "Google Objective-C style guide")
- << MatchedDecl << gen
aaron.ballman added inline comments.
Comment at: clang-tidy/google/FunctionNamingCheck.cpp:113
+ const bool IsGlobal = MatchedDecl->getStorageClass() != SC_Static;
diag(MatchedDecl->getLocation(),
Drop the top-level `const` qualifier, please.
stephanemoore marked 4 inline comments as done.
stephanemoore added inline comments.
Comment at: clang-tidy/google/FunctionNamingCheck.cpp:114-118
diag(MatchedDecl->getLocation(),
- "function name %0 not using function naming conventions described by "
- "Google Ob
stephanemoore 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 "
+ "Goo
benhamilton accepted this revision.
benhamilton added a comment.
This revision is now accepted and ready to land.
Thanks, just minor suggestions.
Comment at: clang-tidy/google/FunctionNamingCheck.cpp:114-118
diag(MatchedDecl->getLocation(),
- "function name %0 not usin
stephanemoore updated this revision to Diff 177609.
stephanemoore marked 4 inline comments as done.
stephanemoore added a comment.
Use the select modifier to customize diagnostics for static and non-static
function instead of branching diagnostic code paths for static and non-static
functions.
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 "
+ "Goo
MyDeveloperDay added inline comments.
Comment at: test/clang-tidy/google-objc-function-naming.m:8
+// must be in Pascal case as required by Google Objective-C style guide
// CHECK-FIXES: static bool Ispositive(int a) { return a > 0; }
I realize there are words
stephanemoore created this revision.
stephanemoore added reviewers: benhamilton, aaron.ballman.
Herald added subscribers: cfe-commits, xazax.hun.
The diagnostics from google-objc-function-naming check will be more
actionable if they provide a brief description of the requirements from
the Google O
12 matches
Mail list logo