xref: /llvm-project/clang/test/SemaObjCXX/fragile-abi-object-assign.m (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
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