brintos

brintos / llvm-project-archived public Read only

0
0
Text · 789 B · 0847698 Raw
51 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-darwin10  -fblocks -verify -Wno-objc-root-class %s 2// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -triple x86_64-apple-darwin10  -fblocks -verify -Wno-objc-root-class %s 3// expected-no-diagnostics4 5@interface Blocky @end6 7@implementation Blocky {8    int _a;9}10- (int)doAThing {11    ^{12        char self;13        return _a;14    }();15    return _a;16}17 18@end19 20@interface ShadowSelf21{22    int _anIvar;23}24@end25 26@interface C {27  int _cIvar;28}29@end30 31@implementation ShadowSelf 32- (void)doSomething {33    __typeof(self) newSelf = self;34    {35        __typeof(self) self = newSelf;36        (void)_anIvar;37    }38    {39      C* self;	40      (void) _anIvar;41    }42}43- (void)doAThing {44    ^{45        id self;46	(void)_anIvar;47    }();48}49@end50 51