Yan Zhang
|
8c348b3338
|
add new check to find NSError init invocation
Summary:
This check will find out improper initialization of NSError objects.
According to Apple developer document, we should always use factory method errorWithDomain:code:userInfo: to create new NSError objects instead of [NSError alloc] init]. Otherwise it will lead to a warning message during runtime in Xcode.
The corresponding information about NSError creation: https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ErrorHandlingCocoa/CreateCustomizeNSError/CreateCustomizeNSError.html
Reviewers: hokein, benhamilton
Reviewed By: benhamilton
Subscribers: klimek, mgorny, cfe-commits
Differential Revision: https://reviews.llvm.org/D40528
llvm-svn: 319459
|
2017-11-30 19:05:08 +00:00 |