aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/google/FunctionNamingCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/google/FunctionNamingCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/google/FunctionNamingCheck.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/clang-tools-extra/clang-tidy/google/FunctionNamingCheck.cpp b/clang-tools-extra/clang-tidy/google/FunctionNamingCheck.cpp
index 3d75f4d..ce0e4e6 100644
--- a/clang-tools-extra/clang-tidy/google/FunctionNamingCheck.cpp
+++ b/clang-tools-extra/clang-tidy/google/FunctionNamingCheck.cpp
@@ -14,9 +14,7 @@ using namespace clang::ast_matchers;
namespace clang::tidy::google::objc {
-namespace {
-
-std::string validFunctionNameRegex(bool RequirePrefix) {
+static std::string validFunctionNameRegex(bool RequirePrefix) {
// Allow the following name patterns for all functions:
// • ABFoo (prefix + UpperCamelCase)
// • ABURL (prefix + capitalized acronym/initialism)
@@ -43,7 +41,7 @@ std::string validFunctionNameRegex(bool RequirePrefix) {
/// For now we will only fix functions of static storage class with names like
/// 'functionName' or 'function_name' and convert them to 'FunctionName'. For
/// other cases the user must determine an appropriate name on their own.
-FixItHint generateFixItHint(const FunctionDecl *Decl) {
+static FixItHint generateFixItHint(const FunctionDecl *Decl) {
// A fixit can be generated for functions of static storage class but
// otherwise the check cannot determine the appropriate function name prefix
// to use.
@@ -82,8 +80,6 @@ FixItHint generateFixItHint(const FunctionDecl *Decl) {
return {};
}
-} // namespace
-
void FunctionNamingCheck::registerMatchers(MatchFinder *Finder) {
// Enforce Objective-C function naming conventions on all functions except:
// • Functions defined in system headers.