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

2018-12-13 Thread Stephane Moore via Phabricator via cfe-commits
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.

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

2018-12-12 Thread Ben Hamilton via Phabricator via cfe-commits
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

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

2018-12-11 Thread Stephane Moore via Phabricator via cfe-commits
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

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

2018-12-11 Thread Stephane Moore via Phabricator via cfe-commits
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

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

2018-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
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.

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

2018-12-10 Thread Stephane Moore via Phabricator via cfe-commits
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

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

2018-12-10 Thread Stephane Moore via Phabricator via cfe-commits
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

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

2018-12-10 Thread Ben Hamilton via Phabricator via cfe-commits
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

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

2018-12-10 Thread Stephane Moore via Phabricator via cfe-commits
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.

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

2018-12-10 Thread Aaron Ballman via Phabricator via cfe-commits
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

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

2018-12-10 Thread MyDeveloperDay via Phabricator via cfe-commits
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

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

2018-12-08 Thread Stephane Moore via Phabricator via cfe-commits
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