1// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-runtime=macosx-fragile-10.5 -verify -Wno-objc-root-class %s 2 3@interface MyView {} 4@end 5 6@implementation MyViewTemplate // expected-warning {{cannot find interface declaration for 'MyViewTemplate'}} 7- (id) createRealObject { 8 id realObj; 9 *(MyView *) realObj = *(MyView *) self; // expected-error {{cannot assign to class object}} 10} 11@end 12 13