diff options
-rw-r--r-- | test/SemaObjC/return.m | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/SemaObjC/return.m b/test/SemaObjC/return.m index c578bf3b65..116abd19e7 100644 --- a/test/SemaObjC/return.m +++ b/test/SemaObjC/return.m @@ -20,3 +20,22 @@ void test3(int a) { // expected-warning {{function could be attribute 'noreturn @throw (id)0; } } + +// <rdar://problem/4289832> - This code always returns, we should not +// issue a noreturn warning. +@class NSException; +@class NSString; +NSString *rdar_4289832() { // no-warning + @try + { + return @"a"; + } + @catch(NSException *exception) + { + return @"b"; + } + @finally + { + } +} + |