Debian Codegraph @

clang/test/Rewriter/line-generation-test.m

raw
1 // RUN: %clang_cc1 -E %s -o %t.mm
2 // RUN: %clang_cc1 -fms-extensions -rewrite-objc -debug-info-kind=limited %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
7 __attribute__((objc_root_class)) @interface MyObject {
8 @public
9 id _myLeader;
10 id _isTickledPink;
11 }
12 @property(retain) id myLeader;
13 @property(assign) id isTickledPink;
14 @end
15
16 @implementation MyObject
17
18 @synthesize myLeader = _myLeader;
19 @synthesize isTickledPink = _isTickledPink;
20
21 - (void) doSomething {
22 _myLeader = _isTickledPink;
23 }
24
25 @end
26
27 MyObject * foo ()
28 {
29 MyObject* p;
30 p.isTickledPink = p.myLeader; // ok
31 p->_isTickledPink = p->_myLeader;
32 return p->_isTickledPink;
33 }
34
35 // CHECK-LINE: #line 21
36 // CHECK-LINE: #line 27
37 // CHECK-NOLINE-NOT: #line 21
38 // CHECK-NOLINE-NOT: #line 27
39