xref: /minix3/external/bsd/llvm/dist/clang/test/Rewriter/rewrite-super-message.mm (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
2*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -DKEEP_ATTRIBUTES -D"id=struct objc_object *" -D"Class=struct objc_class *" -D"SEL=void*" -D"__declspec(X)=" -emit-llvm -o - %t-rw.cpp | FileCheck %t-rw.cpp
3*f4a2713aSLionel Sambuc// radar 7738453
4*f4a2713aSLionel Sambuc
5*f4a2713aSLionel Sambucvoid *sel_registerName(const char *);
6*f4a2713aSLionel Sambuc
7*f4a2713aSLionel Sambuc@interface __NSCFType
8*f4a2713aSLionel Sambuc@end
9*f4a2713aSLionel Sambuc
10*f4a2713aSLionel Sambuc@interface __NSCFString : __NSCFType
11*f4a2713aSLionel Sambuc- (const char *)UTF8String;
12*f4a2713aSLionel Sambuc@end
13*f4a2713aSLionel Sambuc
14*f4a2713aSLionel Sambuc@implementation __NSCFString
15*f4a2713aSLionel Sambuc- (const char *)UTF8String {
16*f4a2713aSLionel Sambuc    return (const char *)[super UTF8String];
17*f4a2713aSLionel Sambuc}
18*f4a2713aSLionel Sambuc@end
19*f4a2713aSLionel Sambuc
20*f4a2713aSLionel Sambuc// CHECK: call %struct.objc_class* @class_getSuperclass
21*f4a2713aSLionel Sambuc
22*f4a2713aSLionel Sambuc@class NSZone;
23*f4a2713aSLionel Sambuc
24*f4a2713aSLionel Sambuc@interface NSObject {
25*f4a2713aSLionel Sambuc}
26*f4a2713aSLionel Sambuc
27*f4a2713aSLionel Sambuc+ (id)allocWithZone:(NSZone *)zone;
28*f4a2713aSLionel Sambuc@end
29*f4a2713aSLionel Sambuc
30*f4a2713aSLionel Sambuc
31*f4a2713aSLionel Sambuc@interface NSArray : NSObject
32*f4a2713aSLionel Sambuc@end
33*f4a2713aSLionel Sambuc
34*f4a2713aSLionel Sambuc@implementation NSArray
35*f4a2713aSLionel Sambuc+ (id)allocWithZone:(NSZone *)zone {
36*f4a2713aSLionel Sambuc    return [super allocWithZone:zone];
37*f4a2713aSLionel Sambuc}
38*f4a2713aSLionel Sambuc@end
39*f4a2713aSLionel Sambuc
40*f4a2713aSLionel Sambuc@interface XNSArray
41*f4a2713aSLionel Sambuc{
42*f4a2713aSLionel Sambuc  Class isa;
43*f4a2713aSLionel Sambuc}
44*f4a2713aSLionel Sambuc@end
45*f4a2713aSLionel Sambuc
46*f4a2713aSLionel Sambuc@class XNSArray;
47*f4a2713aSLionel Sambuc
48*f4a2713aSLionel Sambuc@interface __NSArray0 : XNSArray
49*f4a2713aSLionel Sambuc@end
50*f4a2713aSLionel Sambuc
51*f4a2713aSLionel Sambuc@implementation __NSArray0 @end
52