File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
cpp/ql/test/library-tests/dataflow/partialdefinitions Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -14,3 +14,18 @@ void test()
1414 s.x = 1 ;
1515 s.y .z = 1 ;
1616}
17+
18+ struct Int {
19+ int data;
20+ Int (int value) : data(value) { } // Not a partial definition but a `PostUpdateNode`
21+ int getData () const { return data; }
22+ void setData (int value) { data = value; }
23+ };
24+
25+ int getSet () {
26+ Int myInt (1 );
27+ myInt.setData (
28+ myInt.getData () + 1 // should not be a partial def
29+ );
30+ return myInt.getData (); // should not be a partial def
31+ }
Original file line number Diff line number Diff line change 11| partialdefinitions.cpp:14:2:14:2 | partial def of s | partialdefinitions.cpp:14:2:14:2 | s | partialdefinitions.cpp:14:2:14:8 | ... = ... |
22| partialdefinitions.cpp:15:2:15:2 | partial def of s | partialdefinitions.cpp:15:2:15:2 | s | partialdefinitions.cpp:15:2:15:10 | ... = ... |
33| partialdefinitions.cpp:15:4:15:4 | partial def of y | partialdefinitions.cpp:15:4:15:4 | y | partialdefinitions.cpp:15:2:15:10 | ... = ... |
4+ | partialdefinitions.cpp:22:29:22:32 | partial def of this | file://:0:0:0:0 | this | partialdefinitions.cpp:22:29:22:40 | ... = ... |
5+ | partialdefinitions.cpp:27:3:27:7 | partial def of myInt | partialdefinitions.cpp:27:3:27:7 | myInt | partialdefinitions.cpp:27:3:27:7 | myInt |
6+ | partialdefinitions.cpp:28:7:28:11 | partial def of myInt | partialdefinitions.cpp:28:7:28:11 | myInt | partialdefinitions.cpp:28:7:28:11 | myInt |
7+ | partialdefinitions.cpp:30:10:30:14 | partial def of myInt | partialdefinitions.cpp:30:10:30:14 | myInt | partialdefinitions.cpp:30:10:30:14 | myInt |
You can’t perform that action at this time.
0 commit comments