]> granicus.if.org Git - clang/commitdiff
- Tweak several tests to be compatible with my last commit.
authorSteve Naroff <snaroff@apple.com>
Tue, 11 Dec 2007 03:34:41 +0000 (03:34 +0000)
committerSteve Naroff <snaroff@apple.com>
Tue, 11 Dec 2007 03:34:41 +0000 (03:34 +0000)
- Add a test to message.m for an unusual case for GCC compat (as suggested by Chris).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44842 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/category-1.m
test/Sema/class-def-test-1.m
test/Sema/class-proto-1.m
test/Sema/message.m
test/Sema/protocol-test-2.m

index d0f8d6facdc5a915962cfe1c01cfa7622b6df648..40993e8762f6669c498f8bdc5b9d1612b2c6e4af 100644 (file)
@@ -4,7 +4,7 @@
 
 @protocol p1,p2,p3;
 
-@interface MyClass1 (Category1)  <p1> // expected-error {{cannot find protocol definition for 'p1', referenced by 'Category1'}}
+@interface MyClass1 (Category1)  <p1> // expected-warning {{cannot find protocol definition for 'p1', referenced by 'Category1'}}
 @end
 
 @interface MyClass1 (Category1)  // expected-error {{duplicate interface declaration for category 'MyClass1(Category1)'}}
@@ -27,7 +27,7 @@
 
 @protocol p3 @end
 
-@interface MyClass1 (Category) <p2, p3> @end  // expected-error {{cannot find protocol definition for 'p2', referenced by 'Category'}}
+@interface MyClass1 (Category) <p2, p3> @end  // expected-warning {{cannot find protocol definition for 'p2', referenced by 'Category'}}
 
 @interface MyClass  (Category) @end // expected-error {{cannot find interface declaration for 'MyClass'}}
 
index 94a01cc255453ed9b714f948d09fe102036a88b2..72702d9d18bcd6200baebd3d94dc5f48674fdcfc 100644 (file)
@@ -2,7 +2,7 @@
 
 @protocol SUPER;
 
-@interface SUPER <SUPER> @end // expected-error {{cannot find protocol definition for 'SUPER', referenced by 'SUPER'}}
+@interface SUPER <SUPER> @end // expected-warning {{cannot find protocol definition for 'SUPER', referenced by 'SUPER'}}
 
 typedef int INTF; //  expected-error {{previous definition is here}}
 
index 599290b1dd5423aafa79902f0aa4cd3506613732..f38eaea4c1967c23aef908ef62ebdd34dcd81743 100644 (file)
 
 @interface I1 <p1> @end
 
-@interface E1 <p2> @end        // expected-error {{cannot find protocol definition for 'p2', referenced by 'E1'}}
+@interface E1 <p2> @end        // expected-warning {{cannot find protocol definition for 'p2', referenced by 'E1'}}
 
 @protocol p2 @end
 
 
 @interface I2 <p1,p2> @end
 
-@interface E2 <p1,p2,p3> @end  // expected-error {{cannot find protocol definition for 'p3', referenced by 'E2'}}
+@interface E2 <p1,p2,p3> @end  // expected-warning {{cannot find protocol definition for 'p3', referenced by 'E2'}}
 
 @class U1, U2;
 
index e7717a04859ca0bbf759c8c966a8ce153af61263..dc50a19c81b4c731943d20ba037bb51928ea077c 100644 (file)
@@ -9,3 +9,30 @@
 - (void) meth { [self contents]; } 
 @end
 
+typedef struct _NSPoint {
+    float x;
+    float y;
+} NSPoint;
+
+typedef struct _NSSize {
+    float width; 
+    float height;
+} NSSize;
+
+typedef struct _NSRect {
+    NSPoint origin;
+    NSSize size;
+} NSRect;
+
+@interface AnyClass
+- (NSRect)rect;
+@end
+
+@class Helicopter;
+
+static void func(Helicopter *obj) {
+  // Note that the proto for "rect" is found in the global pool even when
+  // a statically typed object's class interface isn't in scope! This 
+  // behavior isn't very desirable, however wee need it for GCC compatibility.
+  NSRect r = [obj rect];
+}
index f891995bc6d988f1e064fb4b151e89c3c3effcda..f323745c5dfe3e03c9c3db6942660ae8e7ec44fa 100644 (file)
@@ -10,7 +10,7 @@
 - (INTF1<p1>*) meth;
 @end
 
-@protocol PROTO2<p1> // expected-error {{cannot find protocol definition for 'p1', referenced by 'PROTO2'}}
+@protocol PROTO2<p1> // expected-warning {{cannot find protocol definition for 'p1', referenced by 'PROTO2'}}
 @end
 
 @protocol p1 @end
@@ -27,5 +27,5 @@
 @protocol p2 <p1>
 @end
 
-@protocol PROTO4 <p1, p2, PROTO, PROTO3, p3> // expected-error {{cannot find protocol definition for 'p3', referenced by 'PROTO4'}}
+@protocol PROTO4 <p1, p2, PROTO, PROTO3, p3> // expected-warning {{cannot find protocol definition for 'p3', referenced by 'PROTO4'}}
 @end