brintos

brintos / llvm-project-archived public Read only

0
0
Text · 678 B · 723cb61 Raw
39 lines · plain
1#import <objc/NSObject.h>2 3class Base {4public:5    int foo(int x, int y) { return 1; }6    char bar(int x, char y) { return 2; }7    void dat() {}8    static int sfunc(char, int, float) { return 3; }9};10 11class Derived: public Base {12protected:13    int dImpl() { return 1; }14public:15    float baz(float b) { return b + 1.0; }16};17 18@interface Thingy: NSObject {19}20- (id)init;21- (id)fooWithBar: (int)bar andBaz:(id)baz;22@end23 24@implementation Thingy {25}26- (id)init {27    return (self = [super init]);28}29- (id)fooWithBar: (int)bar andBaz:(id)baz {30    return nil;31}32@end33 34int main() {35    Derived d;36    Thingy *thingy = [[Thingy alloc] init];37    return 0; // set breakpoint here38}39