aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2013-01-23 21:29:13 +0000
committerTed Kremenek <kremenek@apple.com>2013-01-23 21:29:13 +0000
commit38878aa394dc6e08146288e86939956bc742fb0b (patch)
tree919ce3ed2aae5315b5e0c4c95f4f97896f57e6cb
parent7a334d9ed9ff7426e78a88582207b47b370ec5de (diff)
Add a test case for 'analyzer_noreturn' on category methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173295 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/NoReturn.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Analysis/NoReturn.m b/test/Analysis/NoReturn.m
index 8207d3acfd..a58efdd029 100644
--- a/test/Analysis/NoReturn.m
+++ b/test/Analysis/NoReturn.m
@@ -112,4 +112,14 @@ void test_rdar11634353_positive() {
*p = 0xDEADBEEF; // expected-warning {{null pointer}}
}
+// Test analyzer_noreturn on category methods.
+@interface NSException (OBExtensions)
++ (void)raise:(NSString *)name reason:(NSString *)reason __attribute__((analyzer_noreturn));
+@end
+
+void PR11959(int *p) {
+ if (!p)
+ [NSException raise:@"Bad Pointer" reason:@"Who knows?"];
+ *p = 0xDEADBEEF; // no-warning
+}