We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2824c98 commit d2cfd53Copy full SHA for d2cfd53
rust/ql/test/library-tests/dataflow/models/main.rs
@@ -31,6 +31,20 @@ enum MyPosEnum {
31
B(i64),
32
}
33
34
+// has a manual flow model with flow from second argument to the return value
35
+// and a wrong generated model with flow from first argument to the return value
36
+fn snd(a: i64, b: i64) -> i64 {
37
+ 0
38
+}
39
+
40
+fn test_snd() {
41
+ let s1 = source(99);
42
+ sink(snd(0, s1)); // $ hasValueFlow=99
43
44
+ let s2 = source(88);
45
+ sink(snd(s2, 0)); // $ SPURIOUS: hasValueFlow=88
46
47
48
// has a flow model
49
fn get_var_pos(e: MyPosEnum) -> i64 {
50
0
0 commit comments