summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephane Moore <mog@google.com>2019-02-02 23:01:20 +0000
committerStephane Moore <mog@google.com>2019-02-02 23:01:20 +0000
commit003311270bd3ab32852b4e45c7fd73eb41212300 (patch)
tree598804fb47e06b3b2a559caf7bb7736fa12da7f2
parentb08a2d485166151985bbf346b64fef923fe83851 (diff)
downloadbcm5719-llvm-003311270bd3ab32852b4e45c7fd73eb41212300.tar.gz
bcm5719-llvm-003311270bd3ab32852b4e45c7fd73eb41212300.zip
Revert rCTE352968 due to compilation failures 💥
llvm-svn: 352969
-rw-r--r--clang-tools-extra/clang-tidy/google/FunctionNamingCheck.cpp10
-rw-r--r--clang-tools-extra/test/clang-tidy/google-objc-function-naming.m8
2 files changed, 3 insertions, 15 deletions
diff --git a/clang-tools-extra/clang-tidy/google/FunctionNamingCheck.cpp b/clang-tools-extra/clang-tidy/google/FunctionNamingCheck.cpp
index 8096d65d7f1..3eeb6fa620d 100644
--- a/clang-tools-extra/clang-tidy/google/FunctionNamingCheck.cpp
+++ b/clang-tools-extra/clang-tidy/google/FunctionNamingCheck.cpp
@@ -93,16 +93,12 @@ void FunctionNamingCheck::registerMatchers(MatchFinder *Finder) {
if (!getLangOpts().ObjC)
return;
- // Enforce Objective-C function naming conventions on all functions except:
- // • Functions defined in system headers.
- // • C++ member functions.
- // • Namespaced functions.
- // • Implicitly defined functions.
- // • The main function.
+ // Match function declarations that are not in system headers and are not
+ // main.
Finder->addMatcher(
functionDecl(
unless(anyOf(isExpansionInSystemHeader(), cxxMethodDecl(),
- hasAncestor(namespaceDecl()), isMain(), isImplicit(),
+ hasAncestor(namespaceDecl()), isMain(),
matchesName(validFunctionNameRegex(true)),
allOf(isStaticStorageClass(),
matchesName(validFunctionNameRegex(false))))))
diff --git a/clang-tools-extra/test/clang-tidy/google-objc-function-naming.m b/clang-tools-extra/test/clang-tidy/google-objc-function-naming.m
index 82169cf9ce6..d0336d267cf 100644
--- a/clang-tools-extra/test/clang-tidy/google-objc-function-naming.m
+++ b/clang-tools-extra/test/clang-tidy/google-objc-function-naming.m
@@ -1,13 +1,5 @@
// RUN: %check_clang_tidy %s google-objc-function-naming %t
-#import <stdio.h>
-
-static void TestImplicitFunctionDeclaration(int a) {
- // Call a builtin function so that the compiler generates an implicit
- // function declaration.
- printf("%d", a);
-}
-
typedef _Bool bool;
static bool ispositive(int a) { return a > 0; }
OpenPOWER on IntegriCloud