add check to avoid throwing objc exception according to Google Objective-C guide
authorYan Zhang <ynzhang@google.com>
Thu, 16 Nov 2017 01:28:29 +0000 (01:28 +0000)
committerYan Zhang <ynzhang@google.com>
Thu, 16 Nov 2017 01:28:29 +0000 (01:28 +0000)
commit9994581395555e994d2158f688bae60c969b1e3e
treea8b7938221a582d637ae76f9fc0239b5681b7937
parent35019dbe6ba58e572818c12279029db6f75cca61
add check to avoid throwing objc exception according to Google Objective-C guide

Summary:
This is a small check to avoid throwing objc exceptions.
In specific it will detect the usage of @throw statement and throw warning.

Reviewers: hokein, benhamilton

Reviewed By: hokein, benhamilton

Subscribers: cfe-commits, mgorny

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

llvm-svn: 318366
clang-tools-extra/clang-tidy/google/AvoidThrowingObjCExceptionCheck.cpp [new file with mode: 0644]
clang-tools-extra/clang-tidy/google/AvoidThrowingObjCExceptionCheck.h [new file with mode: 0644]
clang-tools-extra/clang-tidy/google/CMakeLists.txt
clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/google-objc-avoid-throwing-exception.rst [new file with mode: 0644]
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/test/clang-tidy/google-objc-avoid-throwing-exception.m [new file with mode: 0644]