diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-11 08:28:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-11 08:28:14 +0000 |
commit | a36ec4243bea51afe39c9d25206fe26dd30d748c (patch) | |
tree | 2ecb63e698763bc8137a6defde656d1ba0f4fcaf /clang/test/SemaObjC/call-super-2.m | |
parent | 90c58faea6559a237ea26900a2494936b50eaa5a (diff) | |
download | bcm5719-llvm-a36ec4243bea51afe39c9d25206fe26dd30d748c.tar.gz bcm5719-llvm-a36ec4243bea51afe39c9d25206fe26dd30d748c.zip |
fix PR6811 by not parsing 'super' as a magic expression in
LookupInObjCMethod. Doing so allows all sorts of invalid code
to slip through to codegen. This patch does not change the
AST representation of super, though that would now be a natural
thing to do since it can only be in the receiver position and
in the base of a ObjCPropertyRefExpr.
There are still several ugly areas handling super in the parser,
but this is definitely a step in the right direction.
llvm-svn: 100959
Diffstat (limited to 'clang/test/SemaObjC/call-super-2.m')
-rw-r--r-- | clang/test/SemaObjC/call-super-2.m | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaObjC/call-super-2.m b/clang/test/SemaObjC/call-super-2.m index 9be853b81f8..043314d4e18 100644 --- a/clang/test/SemaObjC/call-super-2.m +++ b/clang/test/SemaObjC/call-super-2.m @@ -69,7 +69,7 @@ id objc_getClass(const char *s); - (int) instance_func1 { int i = (size_t)[self instance_func0]; // expected-warning {{method '-instance_func0' not found (return type defaults to 'id'))}} - return i + (size_t)[super instance_func0]; // expected-warning {{method '-instance_func0' not found (return type defaults to 'id')}} + return i + (size_t)[super instance_func0]; // expected-warning {{'Object' may not respond to 'instance_func0')}} } - (int) instance_func2 { |