forked from OSchip/llvm-project
Revert r330492: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'
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
This commit is contained in:
parent
37334ea67a
commit
e6bfb2c71d
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue