forked from OSchip/llvm-project
![]() Summary: google-objc-global-variable-declaration currently triggers on valid code like: - (void)foo { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ /* ... */ }); } The Google Objective-C style guide says: http://google.github.io/styleguide/objcguide.html#common-variable-names > File scope or global variables (as opposed to constants) declared > outside the scope of a method or function should be rare, and should > have the prefix g. which is meant to insinuate that static variables inside a method or function don't need a special name. Test Plan: `make -j12 check-clang-tools` Reviewers: Wizard, hokein, klimek Reviewed By: Wizard Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D41789 llvm-svn: 321914 |
||
---|---|---|
.. | ||
AvoidCStyleCastsCheck.cpp | ||
AvoidCStyleCastsCheck.h | ||
AvoidThrowingObjCExceptionCheck.cpp | ||
AvoidThrowingObjCExceptionCheck.h | ||
CMakeLists.txt | ||
DefaultArgumentsCheck.cpp | ||
DefaultArgumentsCheck.h | ||
ExplicitConstructorCheck.cpp | ||
ExplicitConstructorCheck.h | ||
ExplicitMakePairCheck.cpp | ||
ExplicitMakePairCheck.h | ||
GlobalNamesInHeadersCheck.cpp | ||
GlobalNamesInHeadersCheck.h | ||
GlobalVariableDeclarationCheck.cpp | ||
GlobalVariableDeclarationCheck.h | ||
GoogleTidyModule.cpp | ||
IntegerTypesCheck.cpp | ||
IntegerTypesCheck.h | ||
NonConstReferences.cpp | ||
NonConstReferences.h | ||
OverloadedUnaryAndCheck.cpp | ||
OverloadedUnaryAndCheck.h | ||
StringReferenceMemberCheck.cpp | ||
StringReferenceMemberCheck.h | ||
TodoCommentCheck.cpp | ||
TodoCommentCheck.h | ||
UnnamedNamespaceInHeaderCheck.cpp | ||
UnnamedNamespaceInHeaderCheck.h | ||
UsingNamespaceDirectiveCheck.cpp | ||
UsingNamespaceDirectiveCheck.h |