[PATCH] D43581: [clang-tidy/google] Fix the Objective-C global variable declaration check 🔧

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 21 08:50:55 PST 2018


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM with a few additional test cases.

It'd be nice if the style guide linked actually described what a "good" prefix is rather than make the reader guess.



================
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;
----------------
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,
};
```


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D43581





More information about the cfe-commits mailing list