Fixed all my recent test cases to have the RUN command and
fixed consequence of these changes in clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42600 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/category-1.m b/test/Sema/category-1.m
index fc3cf6f..d0f8d6f 100644
--- a/test/Sema/category-1.m
+++ b/test/Sema/category-1.m
@@ -1,3 +1,5 @@
+// RUN: clang -fsyntax-only -verify %s
+
@interface MyClass1 @end
@protocol p1,p2,p3;
diff --git a/test/Sema/class-def-test-1.m b/test/Sema/class-def-test-1.m
index d7734df..a33e965 100644
--- a/test/Sema/class-def-test-1.m
+++ b/test/Sema/class-def-test-1.m
@@ -1,8 +1,10 @@
+// RUN: clang -fsyntax-only -verify %s
+
@protocol SUPER;
@interface SUPER <SUPER> @end // expected-error {{cannot find protocol definition for 'SUPER', referenced by 'SUPER'}}
-typedef int INTF; // expected-error {{previou sdefinition is here}}
+typedef int INTF; // expected-error {{previous definition is here}}
@interface INTF @end // expected-error {{redefinition of 'INTF' as different kind of symbol}}
diff --git a/test/Sema/class-impl-1.m b/test/Sema/class-impl-1.m
index 6bd7da1..dedce58 100644
--- a/test/Sema/class-impl-1.m
+++ b/test/Sema/class-impl-1.m
@@ -1,3 +1,5 @@
+// RUN: clang -fsyntax-only -verify %s
+
typedef int INTF3; // expected-error {{previous definition is here}}
@interface SUPER @end // expected-error {{previous definition is here}}
diff --git a/test/Sema/class-proto-1.m b/test/Sema/class-proto-1.m
index dfcd0a2..599290b 100644
--- a/test/Sema/class-proto-1.m
+++ b/test/Sema/class-proto-1.m
@@ -1,3 +1,5 @@
+// RUN: clang -fsyntax-only -verify %s
+
@interface INTF1 @end
@protocol p1,p2,p3;
diff --git a/test/Sema/conflicting-ivar-test-1.m b/test/Sema/conflicting-ivar-test-1.m
index e08da34..7d9cdb6 100644
--- a/test/Sema/conflicting-ivar-test-1.m
+++ b/test/Sema/conflicting-ivar-test-1.m
@@ -1,3 +1,5 @@
+// RUN: clang -fsyntax-only -verify %s
+
@interface INTF
{
@public
diff --git a/test/Sema/forward-class-1.m b/test/Sema/forward-class-1.m
index 4e4e319..2b9369b 100644
--- a/test/Sema/forward-class-1.m
+++ b/test/Sema/forward-class-1.m
@@ -1,3 +1,5 @@
+// RUN: clang -fsyntax-only -verify %s
+
@class FOO, BAR;
@class FOO, BAR;
diff --git a/test/Sema/ivar-sem-check-1.m b/test/Sema/ivar-sem-check-1.m
index fd7a0ff..4e810a2 100644
--- a/test/Sema/ivar-sem-check-1.m
+++ b/test/Sema/ivar-sem-check-1.m
@@ -1,3 +1,5 @@
+// RUN: clang -fsyntax-only -verify %s
+
struct S;
typedef int FOO();
@@ -6,9 +8,11 @@
struct F {} JJ;
int arr[]; // expected-error {{field 'arr' has incomplete type}}
struct S IC; // expected-error {{field 'IC' has incomplete type}}
- struct T { struct T {} X; }YYY; // expected-error {{nested redefinition of 'struct'}}
+ struct T { // expected-error {{previous definition is here}}
+ struct T {} X; // expected-error {{nested redefinition of 'struct'}}
+ }YYY;
FOO BADFUNC; // expected-error {{field 'BADFUNC' declared as a function}}
- int kaka;
+ int kaka; // expected-error {{previous definition is here}}
int kaka; // expected-error {{duplicate member 'kaka'}}
char ch[]; // expected-error {{field 'ch' has incomplete type}}
}
diff --git a/test/Sema/method-undef-category-warn-1.m b/test/Sema/method-undef-category-warn-1.m
index ec68950..af5a0e2 100644
--- a/test/Sema/method-undef-category-warn-1.m
+++ b/test/Sema/method-undef-category-warn-1.m
@@ -1,3 +1,5 @@
+// RUN: clang -fsyntax-only -verify %s
+
@interface MyClass1
@end
@@ -10,17 +12,17 @@
- (void) meth2; // expected-warning {{method definition for 'meth2' not found}}
@end
-@implementation MyClass1(CAT)
+@implementation MyClass1(CAT) // expected-warning {{incomplete implementation of category 'CAT'}}
- (void) Pmeth1{}
-@end // expected-warning {{incomplete implementation of category 'CAT'}}
+@end
@interface MyClass1(DOG) <P>
- (void)ppp; // expected-warning {{method definition for 'ppp' not found}}
@end
-@implementation MyClass1(DOG)
+@implementation MyClass1(DOG) // expected-warning {{incomplete implementation of category 'DOG'}}
- (void) Pmeth {}
-@end // expected-warning {{incomplete implementation of category 'DOG'}}
+@end
@implementation MyClass1(CAT1)
@end
diff --git a/test/Sema/method-undefined-warn-1.m b/test/Sema/method-undefined-warn-1.m
index 29faa7d..0e4e6a1 100644
--- a/test/Sema/method-undefined-warn-1.m
+++ b/test/Sema/method-undefined-warn-1.m
@@ -1,3 +1,5 @@
+// RUN: clang -fsyntax-only -verify %s
+
@interface INTF
- (void) meth;
- (void) meth : (int) arg1;
@@ -6,12 +8,11 @@
+ (void) cls_meth1 : (int) arg1; // expected-warning {{method definition for 'cls_meth1:' not found}}
@end
-@implementation INTF
+@implementation INTF // expected-warning {{incomplete implementation of class 'INTF'}}
- (void) meth {}
- (void) meth : (int) arg2{}
- (void) cls_meth1 : (int) arg2{}
-@end // expected-warning {{incomplete implementation of class 'INTF'}}
-
+@end
@interface INTF1
- (void) meth;
@@ -21,12 +22,11 @@
+ (void) cls_meth1 : (int) arg1; // expected-warning {{method definition for 'cls_meth1:' not found}}
@end
-@implementation INTF1
+@implementation INTF1 // expected-warning {{incomplete implementation of class 'INTF1'}}
- (void) meth {}
- (void) meth : (int) arg2{}
- (void) cls_meth1 : (int) arg2{}
-@end // expected-warning {{incomplete implementation of class 'INTF1'}}
-
+@end
@interface INTF2
- (void) meth;
diff --git a/test/Sema/objc-legacy-implementation-1.m b/test/Sema/objc-legacy-implementation-1.m
index c706ec7..7643447 100644
--- a/test/Sema/objc-legacy-implementation-1.m
+++ b/test/Sema/objc-legacy-implementation-1.m
@@ -1,3 +1,5 @@
+// RUN: clang -fsyntax-only -verify %s
+
@implementation INTF // expected-warning {{cannot find interface declaration for 'INTF'}}
@end
diff --git a/test/Sema/protocol-test-1.m b/test/Sema/protocol-test-1.m
index 37070d9..6fb28b5 100644
--- a/test/Sema/protocol-test-1.m
+++ b/test/Sema/protocol-test-1.m
@@ -1,3 +1,5 @@
+// RUN: clang -fsyntax-only -verify %s
+
@protocol PROTO1
@required
- (int) FooBar;
diff --git a/test/Sema/protocol-test-2.m b/test/Sema/protocol-test-2.m
index 04ad3c6..f891995 100644
--- a/test/Sema/protocol-test-2.m
+++ b/test/Sema/protocol-test-2.m
@@ -1,3 +1,5 @@
+// RUN: clang -fsyntax-only -verify %s
+
@interface INTF1 @end
@protocol p1,p2,p3;
diff --git a/test/Sema/undef-protocol-methods-1.m b/test/Sema/undef-protocol-methods-1.m
index 438feb2..748b151 100644
--- a/test/Sema/undef-protocol-methods-1.m
+++ b/test/Sema/undef-protocol-methods-1.m
@@ -1,3 +1,5 @@
+// RUN: clang -fsyntax-only -verify %s
+
@protocol P1
- (void) P1proto; // expected-warning {{method definition for 'P1proto' not found}}
+ (void) ClsP1Proto; // expected-warning {{method definition for 'ClsP1Proto' not found}}
@@ -15,17 +17,17 @@
@end
@protocol PROTO<P1, P3>
-- (void) meth; // expected-warning {{method definition for 'meth' not found
-- (void) meth : (int) arg1; // expected-warning {{method definition for 'meth:' not found
-+ (void) cls_meth : (int) arg1; // expected-warning {{method definition for 'cls_meth:' not found
+- (void) meth; // expected-warning {{method definition for 'meth' not found}}
+- (void) meth : (int) arg1; // expected-warning {{method definition for 'meth:' not found}}
++ (void) cls_meth : (int) arg1; // expected-warning {{method definition for 'cls_meth:' not found}}
@end
@interface INTF <PROTO>
@end
-@implementation INTF
+@implementation INTF // expected-warning {{incomplete implementation of class 'INTF'}}
- (void) DefP1proto{}
+ (void) DefClsP3Proto{}
-@end // expected-warning {{ncomplete implementation of class 'INTF'}}
+@end
diff --git a/test/Sema/undef-superclass-1.m b/test/Sema/undef-superclass-1.m
index 0b5b7c1..822b971 100644
--- a/test/Sema/undef-superclass-1.m
+++ b/test/Sema/undef-superclass-1.m
@@ -1,3 +1,5 @@
+// RUN: clang -fsyntax-only -verify %s
+
@class SUPER, Y;
@interface INTF :SUPER // expected-error {{cannot find interface declaration for 'SUPER', superclass of 'INTF'}}