[PATCH] D40058: add check to avoid throwing objc exception according to Google Objective-C guide

Ben Hamilton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 15 14:34:11 PST 2017


benhamilton added inline comments.


================
Comment at: test/clang-tidy/google-objc-avoid-throwing-exception.m:17-20
+- (void)f2 {
+    [NSException raise:@"TestException" format:@"Test"];
+    // CHECK-MESSAGES: :[[@LINE-1]]:18: warning: pass in NSError ** instead of throwing exception to indicate Objective-C errors [google-objc-avoid-throwing-exception]
+}
----------------
Would be nice to have a test that confirms sending -raise:format: to a different object does not hit the warning.


https://reviews.llvm.org/D40058





More information about the cfe-commits mailing list