File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed
cpp/ql/test/library-tests/controlflow/guards Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 42
42
| test.cpp:99:6:99:6 | f |
43
43
| test.cpp:105:6:105:14 | ... != ... |
44
44
| test.cpp:111:6:111:14 | ... != ... |
45
+ | test.cpp:122:9:122:9 | b |
46
+ | test.cpp:125:13:125:20 | ! ... |
47
+ | test.cpp:125:14:125:17 | call to safe |
Original file line number Diff line number Diff line change 100
100
| test.cpp:99:6:99:6 | f | true | 99 | 100 |
101
101
| test.cpp:105:6:105:14 | ... != ... | true | 105 | 106 |
102
102
| test.cpp:111:6:111:14 | ... != ... | true | 111 | 112 |
103
+ | test.cpp:122:9:122:9 | b | true | 123 | 125 |
104
+ | test.cpp:122:9:122:9 | b | true | 125 | 125 |
105
+ | test.cpp:125:13:125:20 | ! ... | true | 125 | 125 |
106
+ | test.cpp:125:14:125:17 | call to safe | false | 125 | 125 |
Original file line number Diff line number Diff line change @@ -112,3 +112,17 @@ void int_float_comparison(int i) {
112
112
use (i);
113
113
}
114
114
}
115
+
116
+ int source ();
117
+ bool safe (int );
118
+
119
+ void test (bool b)
120
+ {
121
+ int x;
122
+ if (b)
123
+ {
124
+ x = source ();
125
+ if (!safe (x)) return ;
126
+ }
127
+ use (x);
128
+ }
You can’t perform that action at this time.
0 commit comments