mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
C++: Add test cases with missing inferred equalities.
This commit is contained in:
@@ -176,4 +176,26 @@ void test_with_negated_binary_relational(int a, int b) {
|
||||
if (!c) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void test_logical_and(bool b1, bool b2) {
|
||||
if(!(b1 && b2)) {
|
||||
use(b1);
|
||||
use(b2);
|
||||
} else {
|
||||
// b1 = true and b2 = true
|
||||
use(b1);
|
||||
use(b2);
|
||||
}
|
||||
}
|
||||
|
||||
void test_logical_or(bool b1, bool b2) {
|
||||
if(!(b1 || b2)) {
|
||||
// b1 = false and b2 = false
|
||||
use(b1);
|
||||
use(b2);
|
||||
} else {
|
||||
use(b1);
|
||||
use(b2);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user