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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100959 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaObjC/call-super-2.m b/test/SemaObjC/call-super-2.m
index 9be853b..043314d 100644
--- a/test/SemaObjC/call-super-2.m
+++ b/test/SemaObjC/call-super-2.m
@@ -69,7 +69,7 @@
 - (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
 {
diff --git a/test/SemaObjC/super.m b/test/SemaObjC/super.m
index a61d72f..a644e84 100644
--- a/test/SemaObjC/super.m
+++ b/test/SemaObjC/super.m
@@ -16,7 +16,7 @@
 @implementation B
 
 - (void)instanceMethod {
-  [super iMethod]; // expected-warning{{method '-iMethod' not found (return type defaults to 'id')}}
+  [super iMethod]; // expected-warning{{'A' may not respond to 'iMethod')}}
 }
 
 + classMethod {
@@ -37,12 +37,15 @@
                 expected-warning {{method '-m' not found (return type defaults to 'id')}}
 }
 void f1(int puper) {
-  [super m]; // expected-error{{use of undeclared identifier 'super'}}
+  [super m]; // expected-error{{'super' not valid when not in a method}}
 }
 
 // radar 7400691
 typedef Foo super;
 
+typedef Foo FooTD;
+
 void test() {
+  [FooTD cMethod];
   [super cMethod];
 }