File tree Expand file tree Collapse file tree
cpp/ql/test/library-tests/dataflow/models-as-data Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7272| tests.cpp:422:6:422:25 | [summary] to write: Argument[0].Parameter[0] in madCallArg0WithValue | ArgumentNode | madCallArg0WithValue | madCallArg0WithValue |
7373| tests.cpp:422:6:422:25 | [summary] to write: Argument[0].Parameter[this] in madCallArg0WithValue | ArgumentNode | madCallArg0WithValue | madCallArg0WithValue |
7474| tests.cpp:422:6:422:25 | [summary] to write: Argument[1] in madCallArg0WithValue | PostUpdateNode | madCallArg0WithValue | madCallArg0WithValue |
75+ | tests.cpp:423:5:423:36 | [summary param] 1 in madCallReturnValueIgnoreFunction | ParameterNode | madCallReturnValueIgnoreFunction | madCallReturnValueIgnoreFunction |
76+ | tests.cpp:423:5:423:36 | [summary] to write: ReturnValue in madCallReturnValueIgnoreFunction | ReturnNode | madCallReturnValueIgnoreFunction | madCallReturnValueIgnoreFunction |
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ summarizedCallables
2828| tests.cpp:420:5:420:29 | madCallArg0ReturnToReturn |
2929| tests.cpp:421:9:421:38 | madCallArg0ReturnToReturnFirst |
3030| tests.cpp:422:6:422:25 | madCallArg0WithValue |
31+ | tests.cpp:423:5:423:36 | madCallReturnValueIgnoreFunction |
3132sourceCallables
3233| tests.cpp:3:5:3:10 | source |
3334| tests.cpp:4:6:4:14 | sourcePtr |
@@ -206,7 +207,11 @@ sourceCallables
206207| tests.cpp:421:46:421:52 | fun_ptr |
207208| tests.cpp:422:34:422:40 | fun_ptr |
208209| tests.cpp:422:53:422:57 | value |
209- | tests.cpp:424:5:424:14 | getTainted |
210- | tests.cpp:425:6:425:13 | useValue |
211- | tests.cpp:425:19:425:19 | x |
212- | tests.cpp:427:6:427:27 | test_function_pointers |
210+ | tests.cpp:423:45:423:51 | fun_ptr |
211+ | tests.cpp:423:64:423:68 | value |
212+ | tests.cpp:425:5:425:14 | getTainted |
213+ | tests.cpp:426:6:426:13 | useValue |
214+ | tests.cpp:426:19:426:19 | x |
215+ | tests.cpp:427:6:427:17 | dontUseValue |
216+ | tests.cpp:427:23:427:23 | x |
217+ | tests.cpp:429:6:429:27 | test_function_pointers |
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ private class TestSummaries extends SummaryModelCsv {
9797 ";;false;madCallArg0ReturnToReturn;;;Argument[0].ReturnValue;ReturnValue;value" ,
9898 ";;false;madCallArg0ReturnToReturnFirst;;;Argument[0].ReturnValue;ReturnValue.first;value" ,
9999 ";;false;madCallArg0WithValue;;;Argument[1];Argument[0].Parameter[0];value" ,
100+ ";;false;madCallReturnValueIgnoreFunction;;;Argument[1];ReturnValue;value" ,
100101 ]
101102 }
102103}
Original file line number Diff line number Diff line change @@ -420,9 +420,11 @@ struct intPair {
420420int madCallArg0ReturnToReturn (int (*fun_ptr)()); // $ interpretElement
421421intPair madCallArg0ReturnToReturnFirst (int (*fun_ptr)()); // $ interpretElement
422422void madCallArg0WithValue (void (*fun_ptr)(int ), int value); // $ interpretElement
423+ int madCallReturnValueIgnoreFunction (void (*fun_ptr)(int ), int value); // $ interpretElement
423424
424425int getTainted () { return source (); }
425426void useValue (int x) { sink (x); }
427+ void dontUseValue (int x) { }
426428
427429void test_function_pointers () {
428430 sink (madCallArg0ReturnToReturn (¬ASource));
@@ -433,4 +435,6 @@ void test_function_pointers() {
433435 madCallArg0WithValue (&useValue, 0 );
434436 madCallArg0WithValue (&useValue, source ()); // $ MISSING: ir
435437 madCallArg0WithValue (&sink, source ()); // $ MISSING: ir
438+ madCallReturnValueIgnoreFunction (&sink, source ());
439+ sink (madCallReturnValueIgnoreFunction (&dontUseValue, source ())); // $ ir
436440}
You can’t perform that action at this time.
0 commit comments