Home | History | Annotate | Download | only in Rewriter
      1 // RUN: %clang_cc1 -E %s -o %t.mm
      2 // RUN: %clang_cc1 -fms-extensions -rewrite-objc -g %t.mm -o %t-rw.cpp
      3 // RUN: FileCheck  -check-prefix CHECK-LINE --input-file=%t-rw.cpp %s
      4 // RUN: %clang_cc1 -fms-extensions -rewrite-objc %t.mm -o %t-rwnog.cpp
      5 // RUN: FileCheck  -check-prefix CHECK-NOLINE --input-file=%t-rwnog.cpp %s
      6 // rdar://13138170
      7 
      8 __attribute__((objc_root_class)) @interface MyObject {
      9 @public
     10     id _myMaster;
     11     id _isTickledPink;
     12 }
     13 @property(retain) id myMaster;
     14 @property(assign) id isTickledPink;
     15 @end
     16 
     17 @implementation MyObject
     18 
     19 @synthesize myMaster = _myMaster;
     20 @synthesize isTickledPink = _isTickledPink;
     21 
     22 - (void) doSomething {
     23     _myMaster = _isTickledPink;
     24 }
     25 
     26 @end
     27 
     28 MyObject * foo ()
     29 {
     30 	MyObject* p;
     31         p.isTickledPink = p.myMaster;	// ok
     32 	p->_isTickledPink = p->_myMaster;
     33 	return p->_isTickledPink;
     34 }
     35 
     36 // CHECK-LINE: #line 22
     37 // CHECK-LINE: #line 28
     38 // CHECK-NOLINE-NOT: #line 22
     39 // CHECK-NOLINE-NOT: #line 28
     40 
     41