Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/objc.dg/super-dealloc-1.m @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* Check for warnings about missing [super dealloc] calls. */ /* Author: Ziemowit Laski <zlaski@apple.com> */ /* { dg-do compile } */ @interface Foo { void *isa; } - (void) dealloc; - (void) some_other; @end @interface Bar: Foo { void *casa; } - (void) dealloc; @end @interface Baz: Bar { void *usa; } - (void) dealloc; @end @implementation Foo - (void) dealloc { isa = 0; /* Should not warn here. */ } - (void) some_other { isa = (void *)-1; } @end @implementation Bar - (void) dealloc { casa = 0; [super some_other]; } /* { dg-warning "method possibly missing a .super dealloc. call" } */ @end @implementation Baz - (void) dealloc { usa = 0; [super dealloc]; /* Should not warn here. */ } @end