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 | 454006d625f9f5f48cd80096f1afa0f5985ec25e (patch) | |
tree | 45f968e75b3b2894dca525a44cd973daed0c12c0 /test | |
parent | 3be17941f1edff4843692066f9d33d438a517612 (diff) |
fix rdar://7852959 - Use of super within a block is actually ok.
(aka, Fariborz was right ;-)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101046 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/SemaObjC/super.m | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/SemaObjC/super.m b/test/SemaObjC/super.m index 88de77c259..d751d17719 100644 --- a/test/SemaObjC/super.m +++ b/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; } + + |