phunix/external/bsd/llvm/dist/clang/test/ARCMT/objcmt-property-dot-syntax.m.result
Lionel Sambuc 0a6a1f1d05 NetBSD re-synchronization of the source tree
This brings our tree to NetBSD 7.0, as found on -current on the
10-10-2015.

This updates:
 - LLVM to 3.6.1
 - GCC to GCC 5.1
 - Replace minix/commands/zdump with usr.bin/zdump
 - external/bsd/libelf has moved to /external/bsd/elftoolchain/
 - Import ctwm
 - Drop sprintf from libminc

Change-Id: I149836ac18e9326be9353958bab9b266efb056f0
2016-01-13 20:32:14 +01:00

62 lines
1.3 KiB
Plaintext

// RUN: rm -rf %t
// RUN: %clang_cc1 -objcmt-migrate-property-dot-syntax -mt-migrate-directory %t %s -x objective-c -fobjc-runtime-has-weak -fobjc-arc -triple x86_64-apple-darwin11
// RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result
// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c -fobjc-runtime-has-weak -fobjc-arc %s.result
// rdar://18498572
@interface NSObject @end
@interface P : NSObject
{
P* obj;
int i1, i2, i3;
}
@property int count;
@property (copy) P* PropertyReturnsPObj;
- (P*) MethodReturnsPObj;
@end
P* fun();
@implementation P
- (int) Meth : (P*)array {
obj.count = 100;
((P*)0).count = array.count;
obj.PropertyReturnsPObj.count = array.count;
obj.count = (i1+i2*i3 - 100);
return obj.count -
((P*)0).count + array.count +
fun().count -
obj.PropertyReturnsPObj.count +
self->obj.count;
}
- (P*) MethodReturnsPObj { return 0; }
@end
// rdar://19140267
@interface Sub : P
@end
@implementation Sub
- (int) Meth : (P*)array {
super.count = 100;
super.count = array.count;
super.PropertyReturnsPObj.count = array.count;
super.count = (i1+i2*i3 - 100);
return super.count -
((P*)0).count + array.count +
fun().count -
super.PropertyReturnsPObj.count +
self->obj.count;
}
@end