diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-04-12 17:03:29 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-04-12 17:03:29 +0000 |
| commit | 08e774b7ef3641e8ca83a519e4e882beb43819b0 (patch) | |
| tree | 7f87993dd0725237397c2697111fb201fae64fe0 /clang/test | |
| parent | 5ea6bdd0eaaa82b01f423846fa03c87f7688d12b (diff) | |
| download | bcm5719-llvm-08e774b7ef3641e8ca83a519e4e882beb43819b0.tar.gz bcm5719-llvm-08e774b7ef3641e8ca83a519e4e882beb43819b0.zip | |
fix rdar://7852959 - Use of super within a block is actually ok.
(aka, Fariborz was right ;-)
llvm-svn: 101046
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/SemaObjC/super.m | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/clang/test/SemaObjC/super.m b/clang/test/SemaObjC/super.m index 88de77c259a..d751d177194 100644 --- a/clang/test/SemaObjC/super.m +++ b/clang/test/SemaObjC/super.m @@ -1,4 +1,7 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -fblocks %s + +void takevoidptr(void*); + @interface Foo - iMethod; @@ -7,6 +10,7 @@ @interface A + superClassMethod; +- (void)instanceMethod; @end @interface B : A @@ -18,6 +22,12 @@ - (void)instanceMethod { [super iMethod]; // expected-warning{{'A' may not respond to 'iMethod')}} + + // Use of super in a block is ok and does codegen to the right thing. + // rdar://7852959 + takevoidptr(^{ + [super instanceMethod]; + }); } + classMethod { @@ -71,3 +81,5 @@ int test3() { id X[] = { [ super superClassMethod] }; return 0; } + + |

