Home | History | Annotate | Download | only in Analysis

Lines Matching refs:lhs

68   // LHS is a label, RHS is NULL
74 // LHS is a non-symbolic value, RHS is NULL
80 // LHS is NULL, RHS is non-symbolic
86 // LHS is a symbolic value, RHS is NULL
92 // LHS is NULL, RHS is a symbolic value
171 void use_symbols(int *lhs, int *rhs) {
172 clang_analyzer_eval(lhs < rhs); // expected-warning{{UNKNOWN}}
173 if (lhs < rhs)
175 clang_analyzer_eval(lhs < rhs); // expected-warning{{FALSE}}
177 clang_analyzer_eval(lhs - rhs); // expected-warning{{UNKNOWN}}
178 if ((lhs - rhs) != 5)
180 clang_analyzer_eval((lhs - rhs) == 5); // expected-warning{{TRUE}}
183 void equal_implies_zero(int *lhs, int *rhs) {
184 clang_analyzer_eval(lhs == rhs); // expected-warning{{UNKNOWN}}
185 if (lhs == rhs) {
186 clang_analyzer_eval(lhs != rhs); // expected-warning{{FALSE}}
187 clang_analyzer_eval((rhs - lhs) == 0); // expected-warning{{TRUE}}
190 clang_analyzer_eval(lhs == rhs); // expected-warning{{FALSE}}
191 clang_analyzer_eval(lhs != rhs); // expected-warning{{TRUE}}
192 clang_analyzer_eval((rhs - lhs) == 0); // expected-warning{{FALSE}}
195 void zero_implies_equal(int *lhs, int *rhs) {
196 clang_analyzer_eval((rhs - lhs) == 0); // expected-warning{{UNKNOWN}}
197 if ((rhs - lhs) == 0) {
198 clang_analyzer_eval(lhs != rhs); // expected-warning{{FALSE}}
199 clang_analyzer_eval(lhs == rhs); // expected-warning{{TRUE}}
202 clang_analyzer_eval((rhs - lhs) == 0); // expected-warning{{FALSE}}
203 clang_analyzer_eval(lhs == rhs); // expected-warning{{FALSE}}
204 clang_analyzer_eval(lhs != rhs); // expected-warning{{TRUE}}
207 void comparisons_imply_size(int *lhs, int *rhs) {
208 clang_analyzer_eval(lhs <= rhs); // expected-warning{{UNKNOWN}}
210 if (lhs > rhs) {
211 clang_analyzer_eval((rhs - lhs) == 0); // expected-warning{{FALSE}}
215 clang_analyzer_eval(lhs <= rhs); // expected-warning{{TRUE}}
216 clang_analyzer_eval((rhs - lhs) >= 0); // expected-warning{{TRUE}}
217 clang_analyzer_eval((rhs - lhs) > 0); // expected-warning{{UNKNOWN}}
219 if (lhs >= rhs) {
220 clang_analyzer_eval((rhs - lhs) == 0); // expected-warning{{TRUE}}
224 clang_analyzer_eval(lhs == rhs); // expected-warning{{FALSE}}
225 clang_analyzer_eval(lhs < rhs); // expected-warning{{TRUE}}
226 clang_analyzer_eval((rhs - lhs) > 0); // expected-warning{{TRUE}}
229 void size_implies_comparison(int *lhs, int *rhs) {
230 clang_analyzer_eval(lhs <= rhs); // expected-warning{{UNKNOWN}}
232 if ((rhs - lhs) < 0) {
233 clang_analyzer_eval(lhs == rhs); // expected-warning{{FALSE}}
237 clang_analyzer_eval(lhs <= rhs); // expected-warning{{TRUE}}
238 clang_analyzer_eval((rhs - lhs) >= 0); // expected-warning{{TRUE}}
239 clang_analyzer_eval((rhs - lhs) > 0); // expected-warning{{UNKNOWN}}
241 if ((rhs - lhs) <= 0) {
242 clang_analyzer_eval(lhs == rhs); // expected-warning{{TRUE}}
246 clang_analyzer_eval(lhs == rhs); // expected-warning{{FALSE}}
247 clang_analyzer_eval(lhs < rhs); // expected-warning{{TRUE}}
248 clang_analyzer_eval((rhs - lhs) > 0); // expected-warning{{TRUE}}
255 void zero_implies_reversed_equal(int *lhs, int *rhs) {
256 clang_analyzer_eval((rhs - lhs) == 0); // expected-warning{{UNKNOWN}}
257 if ((rhs - lhs) == 0) {
259 clang_analyzer_eval(rhs != lhs); // expected-warning{{UNKNOWN}}
261 clang_analyzer_eval(rhs == lhs); // expected-warning{{UNKNOWN}}
264 clang_analyzer_eval((rhs - lhs) == 0); // expected-warning{{FALSE}}
266 clang_analyzer_eval(rhs == lhs); // expected-warning{{UNKNOWN}}
268 clang_analyzer_eval(rhs != lhs); // expected-warning{{UNKNOWN}}
271 void canonical_equal(int *lhs, int *rhs) {
272 clang_analyzer_eval(lhs == rhs); // expected-warning{{UNKNOWN}}
273 if (lhs == rhs) {
275 clang_analyzer_eval(rhs == lhs); // expected-warning{{UNKNOWN}}
278 clang_analyzer_eval(lhs == rhs); // expected-warning{{FALSE}}
281 clang_analyzer_eval(rhs == lhs); // expected-warning{{UNKNOWN}}