diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2011-10-20 21:14:49 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2011-10-20 21:14:49 +0000 |
commit | 36981b17ed939300f6f8fc2355a255f711fcef71 (patch) | |
tree | ee2483e98b09cac943dc93a6969d83ca737ff139 /test/SemaObjC/return.m | |
parent | 180abc3db9ae3b4fc63cd65b15697e6ffcc8a657 (diff) |
Notes
Diffstat (limited to 'test/SemaObjC/return.m')
-rw-r--r-- | test/SemaObjC/return.m | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/SemaObjC/return.m b/test/SemaObjC/return.m index 3a626e3696035..4e70bde1edc14 100644 --- a/test/SemaObjC/return.m +++ b/test/SemaObjC/return.m @@ -14,7 +14,7 @@ void test2(int a) { } // PR5286 -void test3(int a) { // expected-warning {{function could be attribute 'noreturn'}} +void test3(int a) { // expected-warning {{function 'test3' could be declared with attribute 'noreturn'}} while (1) { if (a) @throw (id)0; @@ -39,3 +39,12 @@ NSString *rdar_4289832() { // no-warning } } +void exit(int) __attribute__((noreturn)); +@interface rdar10098695 +@end + +@implementation rdar10098695 +- (void)method { // expected-warning{{method 'method' could be declared with attribute 'noreturn'}} + exit(1); +} +@end |