[cfe-commits] r44842 - in /cfe/trunk/test/Sema: category-1.m class-def-test-1.m class-proto-1.m message.m protocol-test-2.m
Steve Naroff
snaroff at apple.com
Mon Dec 10 19:34:42 PST 2007
Author: snaroff
Date: Mon Dec 10 21:34:41 2007
New Revision: 44842
URL: http://llvm.org/viewvc/llvm-project?rev=44842&view=rev
Log:
- Tweak several tests to be compatible with my last commit.
- Add a test to message.m for an unusual case for GCC compat (as suggested by Chris).
Modified:
cfe/trunk/test/Sema/category-1.m
cfe/trunk/test/Sema/class-def-test-1.m
cfe/trunk/test/Sema/class-proto-1.m
cfe/trunk/test/Sema/message.m
cfe/trunk/test/Sema/protocol-test-2.m
Modified: cfe/trunk/test/Sema/category-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/category-1.m?rev=44842&r1=44841&r2=44842&view=diff
==============================================================================
--- cfe/trunk/test/Sema/category-1.m (original)
+++ cfe/trunk/test/Sema/category-1.m Mon Dec 10 21:34:41 2007
@@ -4,7 +4,7 @@
@protocol p1,p2,p3;
- at interface MyClass1 (Category1) <p1> // expected-error {{cannot find protocol definition for 'p1', referenced by 'Category1'}}
+ at 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
- at interface MyClass1 (Category) <p2, p3> @end // expected-error {{cannot find protocol definition for 'p2', referenced by 'Category'}}
+ at 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'}}
Modified: cfe/trunk/test/Sema/class-def-test-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/class-def-test-1.m?rev=44842&r1=44841&r2=44842&view=diff
==============================================================================
--- cfe/trunk/test/Sema/class-def-test-1.m (original)
+++ cfe/trunk/test/Sema/class-def-test-1.m Mon Dec 10 21:34:41 2007
@@ -2,7 +2,7 @@
@protocol SUPER;
- at interface SUPER <SUPER> @end // expected-error {{cannot find protocol definition for 'SUPER', referenced by 'SUPER'}}
+ at interface SUPER <SUPER> @end // expected-warning {{cannot find protocol definition for 'SUPER', referenced by 'SUPER'}}
typedef int INTF; // expected-error {{previous definition is here}}
Modified: cfe/trunk/test/Sema/class-proto-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/class-proto-1.m?rev=44842&r1=44841&r2=44842&view=diff
==============================================================================
--- cfe/trunk/test/Sema/class-proto-1.m (original)
+++ cfe/trunk/test/Sema/class-proto-1.m Mon Dec 10 21:34:41 2007
@@ -14,14 +14,14 @@
@interface I1 <p1> @end
- at interface E1 <p2> @end // expected-error {{cannot find protocol definition for 'p2', referenced by 'E1'}}
+ at interface E1 <p2> @end // expected-warning {{cannot find protocol definition for 'p2', referenced by 'E1'}}
@protocol p2 @end
@interface I2 <p1,p2> @end
- at interface E2 <p1,p2,p3> @end // expected-error {{cannot find protocol definition for 'p3', referenced by 'E2'}}
+ at interface E2 <p1,p2,p3> @end // expected-warning {{cannot find protocol definition for 'p3', referenced by 'E2'}}
@class U1, U2;
Modified: cfe/trunk/test/Sema/message.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/message.m?rev=44842&r1=44841&r2=44842&view=diff
==============================================================================
--- cfe/trunk/test/Sema/message.m (original)
+++ cfe/trunk/test/Sema/message.m Mon Dec 10 21:34:41 2007
@@ -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;
+
+ at interface AnyClass
+- (NSRect)rect;
+ at end
+
+ at 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];
+}
Modified: cfe/trunk/test/Sema/protocol-test-2.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/protocol-test-2.m?rev=44842&r1=44841&r2=44842&view=diff
==============================================================================
--- cfe/trunk/test/Sema/protocol-test-2.m (original)
+++ cfe/trunk/test/Sema/protocol-test-2.m Mon Dec 10 21:34:41 2007
@@ -10,7 +10,7 @@
- (INTF1<p1>*) meth;
@end
- at protocol PROTO2<p1> // expected-error {{cannot find protocol definition for 'p1', referenced by 'PROTO2'}}
+ at 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
- at protocol PROTO4 <p1, p2, PROTO, PROTO3, p3> // expected-error {{cannot find protocol definition for 'p3', referenced by 'PROTO4'}}
+ at protocol PROTO4 <p1, p2, PROTO, PROTO3, p3> // expected-warning {{cannot find protocol definition for 'p3', referenced by 'PROTO4'}}
@end
More information about the cfe-commits
mailing list