diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-06-02 17:58:47 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-02 17:58:47 +0000 |
commit | ec2b103c267a06a66e926f62cd96767b280f5cf5 (patch) | |
tree | ce7d964cbb5e39695b71481698f10cb099c23d4a /test/SemaObjC/category-1.m | |
download | src-ec2b103c267a06a66e926f62cd96767b280f5cf5.tar.gz src-ec2b103c267a06a66e926f62cd96767b280f5cf5.zip |
Import Clang, at r72732.vendor/clang/clang-r72732
Notes
Notes:
svn path=/vendor/clang/dist/; revision=193326
svn path=/vendor/clang/clang-r72732/; revision=193327; tag=vendor/clang/clang-r72732
Diffstat (limited to 'test/SemaObjC/category-1.m')
-rw-r--r-- | test/SemaObjC/category-1.m | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/test/SemaObjC/category-1.m b/test/SemaObjC/category-1.m new file mode 100644 index 000000000000..6ae775848e78 --- /dev/null +++ b/test/SemaObjC/category-1.m @@ -0,0 +1,56 @@ +// RUN: clang-cc -fsyntax-only -verify %s + +@interface MyClass1 @end + +@protocol p1,p2,p3; + +@interface MyClass1 (Category1) <p1> // expected-warning {{cannot find protocol definition for 'p1'}} expected-note {{previous definition is here}} +@end + +@interface MyClass1 (Category1) // expected-warning {{duplicate definition of category 'Category1' on interface 'MyClass1'}} +@end + +@interface MyClass1 (Category3) +@end + +@interface MyClass1 (Category4) @end // expected-note {{previous definition is here}} +@interface MyClass1 (Category5) @end +@interface MyClass1 (Category6) @end +@interface MyClass1 (Category7) @end // expected-note {{previous definition is here}} +@interface MyClass1 (Category8) @end // expected-note {{previous definition is here}} + + +@interface MyClass1 (Category4) @end // expected-warning {{duplicate definition of category 'Category4' on interface 'MyClass1'}} +@interface MyClass1 (Category7) @end // expected-warning {{duplicate definition of category 'Category7' on interface 'MyClass1'}} +@interface MyClass1 (Category8) @end // expected-warning {{duplicate definition of category 'Category8' on interface 'MyClass1'}} + + +@protocol p3 @end + +@interface MyClass1 (Category) <p2, p3> @end // expected-warning {{cannot find protocol definition for 'p2'}} + +@interface MyClass (Category) @end // expected-error {{cannot find interface declaration for 'MyClass'}} + +@class MyClass2; + +@interface MyClass2 (Category) @end // expected-error {{cannot find interface declaration for 'MyClass2'}} + +@interface XCRemoteComputerManager +@end + +@interface XCRemoteComputerManager() +@end + +@interface XCRemoteComputerManager() +@end + +@interface XCRemoteComputerManager(x) // expected-note {{previous definition is here}} +@end + +@interface XCRemoteComputerManager(x) // expected-warning {{duplicate definition of category 'x' on interface 'XCRemoteComputerManager'}} +@end + +@implementation XCRemoteComputerManager +@end + + |