[PATCH] D43581: [clang-tidy/google] Improve the Objective-C global variable declaration check 🔧
Stephane Moore via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 22 22:58:29 PST 2018
stephanemoore marked an inline comment as not done.
stephanemoore added inline comments.
================
Comment at: test/clang-tidy/google-objc-global-variable-declaration.m:33
static NSString* const kGood = @"hello";
+static NSString* const XYGood = @"hello";
static NSString* gMyIntGood = 0;
----------------
aaron.ballman wrote:
> Can you also add the code from the style guide as a test case?
> ```
> extern NSString *const GTLServiceErrorDomain;
>
> typedef NS_ENUM(NSInteger, GTLServiceError) {
> GTLServiceErrorQueryResultMissing = -3000,
> GTLServiceErrorWaitTimedOut = -3001,
> };
> ```
NS_ENUM and NSInteger are not defined in this implementation file.
I can either (1) Omit the macro and the type alias; or (2) reasonably replicate the macro and type alias in this source file.
Which option is preferred? For the time being, I have pursued option (1) on the assumption that NS_ENUM and NSInteger are not critical to this test case.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D43581
More information about the cfe-commits
mailing list