[PATCH] D65917: [clang-tidy] Added check for the Google style guide's category method naming rule.
David Gatwood via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 3 10:16:27 PDT 2019
dgatwood marked 17 inline comments as done.
dgatwood added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/google/RequireCategoryMethodPrefixesCheck.cpp:57
+ }
+ std::string method_name = method_declaration->getNameAsString();
+ auto owning_objc_class_interface = method_declaration->getClassInterface();
----------------
aaron.ballman wrote:
> This should use `getName()` to get a `StringRef` to avoid the copy.
That's actually what I originally tried, but that method won't work here, unless I'm missing something. The getName() method crashes with a message saying that "Name is not a simple identifier".
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/google-objc-require-category-method-prefixes.rst:19
+
+You should set the clang option WhitelistedPrefixes to a semicolon-delimited
+lits of class prefixes within your project if you want to be able to create
----------------
Eugene.Zelenko wrote:
> See other checks documentation for proper option section style.
>
> clang -> :program:`clang-tidy` and enclose WhitelistedPrefixes in single back-ticks.
Removed the text in question, because it duplicates the Options info.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65917/new/
https://reviews.llvm.org/D65917
More information about the cfe-commits
mailing list