Revert r330492: [clang-tidy] add new check to find out objc ivars which do not have...
authorChandler Carruth <chandlerc@gmail.com>
Sat, 21 Apr 2018 23:27:34 +0000 (23:27 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 21 Apr 2018 23:27:34 +0000 (23:27 +0000)
This commit has been breaking most bots for a day now. There is a fix
proposed in https://reviews.llvm.org/D45912 but when I applied that
I just got different errors. Reverting to get our bots back to green.

llvm-svn: 330528

clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
clang-tools-extra/test/clang-tidy/readability-identifier-naming-objc.m [deleted file]

index c6b5265..95a71f6 100644 (file)
@@ -109,7 +109,6 @@ namespace readability {
     m(TemplateParameter) \
     m(TypeAlias) \
     m(MacroDefinition) \
-    m(ObjcIvar) \
 
 enum StyleKind {
 #define ENUMERATE(v) SK_ ## v,
@@ -385,9 +384,6 @@ static StyleKind findStyleKind(
     const NamedDecl *D,
     const std::vector<llvm::Optional<IdentifierNamingCheck::NamingStyle>>
         &NamingStyles) {
-  if (isa<ObjCIvarDecl>(D) && NamingStyles[SK_ObjcIvar])
-    return SK_ObjcIvar;
-
   if (isa<TypedefDecl>(D) && NamingStyles[SK_Typedef])
     return SK_Typedef;
 
diff --git a/clang-tools-extra/test/clang-tidy/readability-identifier-naming-objc.m b/clang-tools-extra/test/clang-tidy/readability-identifier-naming-objc.m
deleted file mode 100644 (file)
index 4b3be03..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// RUN: %check_clang_tidy %s readability-identifier-naming %t \
-// RUN: -config='{CheckOptions: \
-// RUN:  [{key: readability-identifier-naming.ObjcIvarPrefix, value: '_'}]}' \
-// RUN: --
-
-@interface Foo
-@end 
-
-@interface Foo () {
-    int _bar;
-    int barWithoutPrefix;
-    // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: invalid case style for objc ivar 'barWithoutPrefix' [readability-identifier-naming]
-    // CHECK-FIXES: int _barWithoutPrefix;
-}
-@end