Home | History | Annotate | Download | only in SemaObjCXX
      1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
      2 
      3 @interface PBXTrackableTaskManager @end
      4 @implementation PBXTrackableTaskManager @end
      5 
      6 struct x {
      7   operator PBXTrackableTaskManager *() const { return 0; }
      8 } a;
      9 
     10 struct y {
     11   operator int *() const { return 0; }
     12 } b;
     13 
     14 void test1() {
     15   @synchronized (a) {
     16   }
     17 
     18   @synchronized (b) {  // expected-error {{@synchronized requires an Objective-C object type ('struct y' invalid)}}
     19   }
     20 }
     21