llvm-project/clang-tools-extra/clang-tidy/google
Stephane Moore 5f70c473c9 [clang-tidy] Disable google-runtime-int in Objective-C++ 🔓
Summary:
In contrast to Google C++, Objective-C often uses built-in integer types
other than `int`. In fact, the Objective-C runtime itself defines the
types NSInteger¹ and NSUInteger² which are variant types depending on
the target architecture. The Objective-C style guide indicates that
usage of system types with variant sizes is appropriate when handling
values provided by system interfaces³. Objective-C++ is commonly the
result of conversion from Objective-C to Objective-C++ for the purpose
of integrating C++ functionality. The opposite of Objective-C++ being
used to expose Objective-C functionality to C++ is less common,
potentially because Objective-C has a signficantly more uneven presence
on different platforms compared to C++. This generally predisposes
Objective-C++ to commonly being more Objective-C than C++. Forcing
Objective-C++ developers to perform conversions between variant system types
and fixed size integer types depending on target architecture when
Objective-C++ commonly uses variant system types from Objective-C is
likely to lead to more bugs and overhead than benefit. For that reason,
this change proposes to disable google-runtime-int in Objective-C++.

[1] https://developer.apple.com/documentation/objectivec/nsinteger?language=objc
[2] https://developer.apple.com/documentation/objectivec/nsuinteger?language=objc
[3] "Types long, NSInteger, NSUInteger, and CGFloat vary in size between
32- and 64-bit builds. Use of these types is appropriate when handling
values exposed by system interfaces, but they should be avoided for most
other computations."
https://github.com/google/styleguide/blob/gh-pages/objcguide.md#types-with-inconsistent-sizes

Subscribers: xazax.hun, jdoerfert, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D59336

llvm-svn: 356627
2019-03-20 23:05:00 +00:00
..
AvoidCStyleCastsCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AvoidCStyleCastsCheck.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AvoidThrowingObjCExceptionCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AvoidThrowingObjCExceptionCheck.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AvoidUnderscoreInGoogletestNameCheck.cpp [clang-tidy] Add check for underscores in googletest names. 2019-01-25 10:03:49 +00:00
AvoidUnderscoreInGoogletestNameCheck.h [clang-tidy] Add check for underscores in googletest names. 2019-01-25 10:03:49 +00:00
CMakeLists.txt [clang-tidy] Add check for underscores in googletest names. 2019-01-25 10:03:49 +00:00
DefaultArgumentsCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DefaultArgumentsCheck.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ExplicitConstructorCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ExplicitConstructorCheck.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ExplicitMakePairCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ExplicitMakePairCheck.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FunctionNamingCheck.cpp [clang-tidy] Make google-objc-function-naming ignore implicit functions 🙈 2019-02-21 00:34:01 +00:00
FunctionNamingCheck.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
GlobalNamesInHeadersCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
GlobalNamesInHeadersCheck.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
GlobalVariableDeclarationCheck.cpp Fixed global constant/variable naming check on C++ class for ObjC++ files. 2019-03-15 00:17:41 +00:00
GlobalVariableDeclarationCheck.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
GoogleTidyModule.cpp [clang-tidy] Add check for underscores in googletest names. 2019-01-25 10:03:49 +00:00
IntegerTypesCheck.cpp [clang-tidy] Disable google-runtime-int in Objective-C++ 🔓 2019-03-20 23:05:00 +00:00
IntegerTypesCheck.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
NonConstReferences.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
NonConstReferences.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
OverloadedUnaryAndCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
OverloadedUnaryAndCheck.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TodoCommentCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TodoCommentCheck.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UnnamedNamespaceInHeaderCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UnnamedNamespaceInHeaderCheck.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UsingNamespaceDirectiveCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UsingNamespaceDirectiveCheck.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00