Author: kremenek Date: Tue Jun 29 15:25:42 2010 New Revision: 107203 URL: http://llvm.org/viewvc/llvm-project?rev=107203&view=rev Log: Add test case for <rdar://problem/4289832>. Clang actuallys gets the test case right (for the noreturn warning) because the CFG doesn't support @try yet, but the test case is now present when we do properly implement CFG support for @try...@catch.
Modified: cfe/trunk/test/SemaObjC/return.m Modified: cfe/trunk/test/SemaObjC/return.m URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/return.m?rev=107203&r1=107202&r2=107203&view=diff ============================================================================== --- cfe/trunk/test/SemaObjC/return.m (original) +++ cfe/trunk/test/SemaObjC/return.m Tue Jun 29 15:25:42 2010 @@ -20,3 +20,22 @@ @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 + { + } +} + _______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits