diff options
Diffstat (limited to 'test/SemaObjC')
-rw-r--r-- | test/SemaObjC/block-attr.m | 1 | ||||
-rw-r--r-- | test/SemaObjC/error-property-gc-attr.m | 5 | ||||
-rw-r--r-- | test/SemaObjC/method-conflict.m | 11 | ||||
-rw-r--r-- | test/SemaObjC/objc2-warn-weak-decl.m | 1 | ||||
-rw-r--r-- | test/SemaObjC/warn-assign-property-nscopying.m | 1 | ||||
-rw-r--r-- | test/SemaObjC/warn-weak-field.m | 1 |
6 files changed, 18 insertions, 2 deletions
diff --git a/test/SemaObjC/block-attr.m b/test/SemaObjC/block-attr.m index c89aed4..de203e7 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 a361704..661638c 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 08fdfc0..5dc886f 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 76b542d..22a3fca 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 953814c..1bdb4f0 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 f20691c..ead454a 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}} |