2009-12-14 20:36:25 +03:00
|
|
|
// RUN: clang -cc1 -fsyntax-only -verify %s
|
2008-06-05 00:36:13 +04:00
|
|
|
|
2009-04-24 01:49:04 +04:00
|
|
|
@interface PBXTrackableTaskManager @end
|
2008-06-05 00:36:13 +04:00
|
|
|
|
|
|
|
@implementation PBXTrackableTaskManager
|
2009-07-22 04:43:08 +04:00
|
|
|
- (id) init { return 0; }
|
2009-04-21 10:11:25 +04:00
|
|
|
- (void) unregisterTask:(id) task {
|
2008-06-05 00:36:13 +04:00
|
|
|
@synchronized (self) {
|
2009-04-21 10:11:25 +04:00
|
|
|
id taskID = [task taskIdentifier]; // expected-warning {{method '-taskIdentifier' not found (return type defaults to 'id')}}
|
2008-06-05 00:36:13 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
2009-04-21 10:11:25 +04:00
|
|
|
|
|
|
|
struct x { int a; } b;
|
|
|
|
|
|
|
|
void test1() {
|
|
|
|
@synchronized (b) { // expected-error {{@synchronized requires an Objective-C object type ('struct x' invalid)}}
|
|
|
|
}
|
|
|
|
|
|
|
|
@synchronized (42) { // expected-error {{@synchronized requires an Objective-C object type ('int' invalid)}}
|
|
|
|
}
|
|
|
|
}
|