File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed
cpp/ql/test/library-tests/dataflow/dataflow-tests Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,9 @@ postWithInFlow
129
129
| test.cpp:694:4:694:6 | buf [inner post update] | PostUpdateNode should not be the target of local flow. |
130
130
| test.cpp:704:23:704:25 | buf [inner post update] | PostUpdateNode should not be the target of local flow. |
131
131
| test.cpp:715:25:715:25 | c [inner post update] | PostUpdateNode should not be the target of local flow. |
132
+ | test.cpp:728:3:728:4 | * ... [post update] | PostUpdateNode should not be the target of local flow. |
133
+ | test.cpp:728:4:728:4 | p [inner post update] | PostUpdateNode should not be the target of local flow. |
134
+ | test.cpp:734:41:734:41 | x [inner post update] | PostUpdateNode should not be the target of local flow. |
132
135
viableImplInCallContextTooLarge
133
136
uniqueParameterNodeAtPosition
134
137
uniqueParameterNodePosition
Original file line number Diff line number Diff line change @@ -715,8 +715,22 @@ void write_to_star_buf(unsigned char *buf) // $ ast-def=buf
715
715
write_to_star_star_p (&c);
716
716
}
717
717
718
- void test (unsigned char *source) // $ ast-def=source
718
+ void test_write_to_star_buf (unsigned char *source) // $ ast-def=source
719
719
{
720
720
write_to_star_buf (source);
721
721
sink (*source); // clean
722
- }
722
+ }
723
+
724
+ void does_not_write_source_to_dereference (int *p) // $ ast-def=p ir-def=*p
725
+ {
726
+ int x = source ();
727
+ p = &x;
728
+ *p = 42 ;
729
+ }
730
+
731
+ void test_does_not_write_source_to_dereference ()
732
+ {
733
+ int x;
734
+ does_not_write_source_to_dereference (&x);
735
+ sink (x); // $ ast,ir=733:7 SPURIOUS: ast,ir=726:11
736
+ }
Original file line number Diff line number Diff line change 42
42
| test.cpp:551:9:551:9 | y | test.cpp:552:28:552:28 | y |
43
43
| test.cpp:595:8:595:9 | xs | test.cpp:596:3:596:4 | xs |
44
44
| test.cpp:595:8:595:9 | xs | test.cpp:597:9:597:10 | xs |
45
+ | test.cpp:733:7:733:7 | x | test.cpp:734:41:734:41 | x |
46
+ | test.cpp:733:7:733:7 | x | test.cpp:735:8:735:8 | x |
You can’t perform that action at this time.
0 commit comments