From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- .../SemaObjC/protocol-implementation-inherited.m | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 clang/test/SemaObjC/protocol-implementation-inherited.m (limited to 'clang/test/SemaObjC/protocol-implementation-inherited.m') diff --git a/clang/test/SemaObjC/protocol-implementation-inherited.m b/clang/test/SemaObjC/protocol-implementation-inherited.m new file mode 100644 index 0000000..c333bb5 --- /dev/null +++ b/clang/test/SemaObjC/protocol-implementation-inherited.m @@ -0,0 +1,56 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +@protocol P0 +-bar; +@end + +@interface A +@end + +// Interface conforms to inherited protocol + +@interface B0 : A +@end + +@implementation B0 +@end + +// Interface conforms to a protocol which extends another. The other +// protocol is inherited, and extended methods are implemented. + +@protocol P1 +-foo; +@end + +@interface B1 : A +@end + +@implementation B1 +-foo { return 0; }; +@end + +// Interface conforms to a protocol whose methods are provided by an +// alternate inherited protocol. + +@protocol P2 +-bar; +@end + +@interface B2 : A +@end + +@implementation B2 +@end + +// Interface conforms to a protocol whose methods are provided by a base class. + +@interface A1 +-bar; +@end + +@interface B3 : A1 +@end + +@implementation B3 +@end + -- cgit v1.2.3