• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 -emit-llvm -o %t %s
2
3@interface Object
4- (id) new;
5@end
6
7@interface SomeClass : Object
8{
9  int _myValue;
10}
11@property int myValue;
12@end
13
14@implementation SomeClass
15@synthesize myValue=_myValue;
16@end
17
18int main()
19{
20    int val;
21    SomeClass *o = [SomeClass new];
22    o.myValue = -1;
23    val = o.myValue++; /* val -1, o.myValue 0 */
24    val += o.myValue--; /* val -1. o.myValue -1 */
25    val += ++o.myValue; /* val -1, o.myValue 0 */
26    val += --o.myValue; /* val -2, o.myValue -1 */
27    return ++o.myValue + (val+2);
28}
29
30