File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 3939// RANGE-NEXT: "line": 15,
4040// RANGE-NEXT: "column": 2
4141// RANGE-NEXT: }
42+ // RANGE-NEXT: },
43+ // RANGE-NEXT: {
44+ // RANGE-NEXT: "from": {
45+ // RANGE-NEXT: "line": 19,
46+ // RANGE-NEXT: "column": 1
47+ // RANGE-NEXT: },
48+ // RANGE-NEXT: "to": {
49+ // RANGE-NEXT: "line": 19,
50+ // RANGE-NEXT: "column": 41
51+ // RANGE-NEXT: }
52+ // RANGE-NEXT: },
53+ // RANGE-NEXT: {
54+ // RANGE-NEXT: "from": {
55+ // RANGE-NEXT: "line": 20,
56+ // RANGE-NEXT: "column": 1
57+ // RANGE-NEXT: },
58+ // RANGE-NEXT: "to": {
59+ // RANGE-NEXT: "line": 23,
60+ // RANGE-NEXT: "column": 2
61+ // RANGE-NEXT: }
4262// RANGE-NEXT: }
4363// RANGE-NEXT: ]
4464// RANGE-NEXT: }
@@ -68,6 +88,16 @@ int multiply(int a, int b) {
6888 return a * b;
6989}
7090
91+ inline int unused_by_foo () {} // line 17
92+
93+ inline void recursively_used_by_foo () {} // line 19
94+ inline int used_by_foo () { // line 20
95+ recursively_used_by_foo ();
96+ return 1 ;
97+ }
98+
99+ struct UnusedByFoo {};
100+
71101// --- foo.cpp
72102#include " foo.h"
73103int global_value = 5 ;
@@ -76,4 +106,6 @@ int main() {
76106 int current_value = data.getValue ();
77107 int doubled_value = multiply (current_value, 2 );
78108 int final_result = doubled_value + global_value;
109+
110+ return used_by_foo ();
79111}
You can’t perform that action at this time.
0 commit comments