File tree Expand file tree Collapse file tree
cpp/ql/test/library-tests/controlflow/guards Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4242| test.cpp:99:6:99:6 | f |
4343| test.cpp:105:6:105:14 | ... != ... |
4444| 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 100100| test.cpp:99:6:99:6 | f | true | 99 | 100 |
101101| test.cpp:105:6:105:14 | ... != ... | true | 105 | 106 |
102102| 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) {
112112 use (i);
113113 }
114114}
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