summaryrefslogtreecommitdiff
path: root/test/SemaObjC
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-05-27 15:17:06 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-05-27 15:17:06 +0000
commitd7279c4c177bca357ef96ff1379fd9bc420bfe83 (patch)
tree3558f327a6f9ab59c5d7a06528d84e1560445247 /test/SemaObjC
parentbe17651f5cd2e94922c1b732bc8589e180698193 (diff)
Notes
Diffstat (limited to 'test/SemaObjC')
-rw-r--r--test/SemaObjC/block-attr.m1
-rw-r--r--test/SemaObjC/error-property-gc-attr.m5
-rw-r--r--test/SemaObjC/method-conflict.m11
-rw-r--r--test/SemaObjC/objc2-warn-weak-decl.m1
-rw-r--r--test/SemaObjC/warn-assign-property-nscopying.m1
-rw-r--r--test/SemaObjC/warn-weak-field.m1
6 files changed, 18 insertions, 2 deletions
diff --git a/test/SemaObjC/block-attr.m b/test/SemaObjC/block-attr.m
index c89aed4bb60dd..de203e711ede7 100644
--- a/test/SemaObjC/block-attr.m
+++ b/test/SemaObjC/block-attr.m
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -fblocks -fobjc-gc-only %s
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fsyntax-only -verify -fblocks -fobjc-gc-only %s
@interface Thing {}
diff --git a/test/SemaObjC/error-property-gc-attr.m b/test/SemaObjC/error-property-gc-attr.m
index a36170475bc22..661638c52e069 100644
--- a/test/SemaObjC/error-property-gc-attr.m
+++ b/test/SemaObjC/error-property-gc-attr.m
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-gc -fsyntax-only -verify %s
+// RUN: %clang_cc1 -x objective-c++ -triple i386-apple-darwin9 -fobjc-gc -fsyntax-only -verify %s
@interface INTF
{
@@ -11,7 +12,7 @@
}
@property (assign) __weak id pweak;
@property (assign) __weak id WID;
-@property (assign) __strong id not;
+@property (assign) __strong id NOT;
@property (assign) id ID;
@property (assign) INTF* AWEAK;
@property (assign) __weak INTF* WI;
@@ -19,7 +20,7 @@
@implementation INTF
@synthesize pweak=IVAR; // expected-error {{existing ivar 'IVAR' for __weak property 'pweak' must be __weak}}
-@synthesize not=II; // expected-error {{existing ivar 'II' for a __strong property 'not' must be garbage collectable}}
+@synthesize NOT=II; // expected-error {{existing ivar 'II' for a __strong property 'NOT' must be garbage collectable}}
@synthesize WID;
@synthesize ID;
@synthesize AWEAK; // expected-error {{existing ivar 'AWEAK' for a __strong property 'AWEAK' must be garbage collectable}}
diff --git a/test/SemaObjC/method-conflict.m b/test/SemaObjC/method-conflict.m
index 08fdfc017ccc7..5dc886fb7fd24 100644
--- a/test/SemaObjC/method-conflict.m
+++ b/test/SemaObjC/method-conflict.m
@@ -53,3 +53,14 @@ typedef NSUInteger XDSourceLanguage;
return 0;
}
@end
+
+// rdar: // 8006060
+@interface Bar
+- (void)foo:(id)format, ...; // expected-note {{previous declaration is here}}
+- (void)foo1:(id)format; // expected-note {{previous declaration is here}}
+@end
+@implementation Bar
+- (void)foo:(id)format {}; // expected-warning {{conflicting variadic declaration of method and its implementation}}
+- (void)foo1:(id)format, ... {}; // expected-warning {{conflicting variadic declaration of method and its implementation}}
+@end
+
diff --git a/test/SemaObjC/objc2-warn-weak-decl.m b/test/SemaObjC/objc2-warn-weak-decl.m
index 76b542de94a63..22a3fca91ba5e 100644
--- a/test/SemaObjC/objc2-warn-weak-decl.m
+++ b/test/SemaObjC/objc2-warn-weak-decl.m
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify %s
+// RUN: %clang_cc1 -x objective-c++ -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify %s
struct S {
__weak id p; // expected-warning {{__weak attribute cannot be specified on a field declaration}}
};
diff --git a/test/SemaObjC/warn-assign-property-nscopying.m b/test/SemaObjC/warn-assign-property-nscopying.m
index 953814cdce1b0..1bdb4f0de93e7 100644
--- a/test/SemaObjC/warn-assign-property-nscopying.m
+++ b/test/SemaObjC/warn-assign-property-nscopying.m
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fobjc-gc -fsyntax-only -verify %s
+// RUN: %clang_cc1 -x objective-c++ -fobjc-gc -fsyntax-only -verify %s
@protocol NSCopying @end
diff --git a/test/SemaObjC/warn-weak-field.m b/test/SemaObjC/warn-weak-field.m
index f20691c186963..ead454a04a37c 100644
--- a/test/SemaObjC/warn-weak-field.m
+++ b/test/SemaObjC/warn-weak-field.m
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify %s
+// RUN: %clang_cc1 -x objective-c++ -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify %s
struct S {
__weak id w; // expected-warning {{__weak attribute cannot be specified on a field declaration}}