2014-10-17 07:43:34 +08:00
|
|
|
// RUN: %clang --target=%itanium_abi_host_triple -O0 -g %s -c -o %t.o
|
|
|
|
// RUN: %clang --target=%itanium_abi_host_triple %t.o -o %t.out -framework Foundation
|
2011-04-28 10:23:17 +08:00
|
|
|
// RUN: %test_debuginfo %s %t.out
|
2012-10-20 09:38:50 +08:00
|
|
|
|
|
|
|
// REQUIRES: system-darwin
|
2011-04-28 10:23:17 +08:00
|
|
|
// Radar 9279956
|
2011-05-28 22:03:16 +08:00
|
|
|
|
2011-05-29 11:51:55 +08:00
|
|
|
// DEBUGGER: break 31
|
2011-04-28 10:23:17 +08:00
|
|
|
// DEBUGGER: r
|
|
|
|
// DEBUGGER: p m2
|
2014-02-21 03:51:07 +08:00
|
|
|
// CHECK: ${{[0-9]}} = 1
|
2011-04-28 10:23:17 +08:00
|
|
|
// DEBUGGER: p dbTransaction
|
2014-02-21 03:51:07 +08:00
|
|
|
// CHECK: ${{[0-9]}} = 0
|
2011-04-28 10:23:17 +08:00
|
|
|
// DEBUGGER: p master
|
2014-02-21 03:51:07 +08:00
|
|
|
// CHECK: ${{[0-9]}} = 0
|
2011-04-28 10:23:17 +08:00
|
|
|
|
|
|
|
#include <Cocoa/Cocoa.h>
|
|
|
|
|
|
|
|
extern void foo(void(^)(void));
|
|
|
|
|
|
|
|
@interface A:NSObject @end
|
|
|
|
@implementation A
|
|
|
|
- (void) helper {
|
|
|
|
int master = 0;
|
|
|
|
__block int m2 = 0;
|
|
|
|
__block int dbTransaction = 0;
|
|
|
|
int (^x)(void) = ^(void) { (void) self;
|
|
|
|
(void) master;
|
|
|
|
(void) dbTransaction;
|
|
|
|
m2++;
|
|
|
|
return m2;
|
|
|
|
};
|
|
|
|
master = x();
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
void foo(void(^x)(void)) {}
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
A *a = [A alloc];
|
|
|
|
[a helper];
|
|
|
|
return 0;
|
|
|
|
}
|