Skip to content
Commit 8c348b33 authored by Yan Zhang's avatar Yan Zhang
Browse files

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
parent 59e3d198
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment