mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C++: Remove the type restriction on 'GuardConditionFromNotExpr' since this class also applies to C++.
This commit is contained in:
@@ -268,7 +268,6 @@ private class GuardConditionFromNotExpr extends GuardConditionImpl {
|
||||
exists(NotExpr notExpr, Type t |
|
||||
this = notExpr.getOperand() and
|
||||
t = this.getUnspecifiedType() and
|
||||
not t instanceof BoolType and
|
||||
ir.getUnconvertedResultExpression() = notExpr
|
||||
)
|
||||
}
|
||||
|
||||
@@ -262,9 +262,13 @@
|
||||
| 122 | b == 0 when b is false |
|
||||
| 122 | b == 1 when b is true |
|
||||
| 125 | ! ... != 0 when ! ... is true |
|
||||
| 125 | ! ... != 0 when call to safe is false |
|
||||
| 125 | ! ... != 1 when ! ... is false |
|
||||
| 125 | ! ... != 1 when call to safe is true |
|
||||
| 125 | ! ... == 0 when ! ... is false |
|
||||
| 125 | ! ... == 0 when call to safe is true |
|
||||
| 125 | ! ... == 1 when ! ... is true |
|
||||
| 125 | ! ... == 1 when call to safe is false |
|
||||
| 125 | call to safe != 0 when ! ... is false |
|
||||
| 125 | call to safe != 0 when call to safe is true |
|
||||
| 125 | call to safe != 1 when ! ... is true |
|
||||
|
||||
@@ -540,6 +540,8 @@ unary
|
||||
| test.cpp:125:13:125:20 | ! ... | test.cpp:125:13:125:20 | ! ... | == | 1 | 125 | 125 |
|
||||
| test.cpp:125:13:125:20 | ! ... | test.cpp:125:14:125:17 | call to safe | != | 1 | 125 | 125 |
|
||||
| test.cpp:125:13:125:20 | ! ... | test.cpp:125:14:125:17 | call to safe | == | 0 | 125 | 125 |
|
||||
| test.cpp:125:14:125:17 | call to safe | test.cpp:125:13:125:20 | ! ... | != | 0 | 125 | 125 |
|
||||
| test.cpp:125:14:125:17 | call to safe | test.cpp:125:13:125:20 | ! ... | == | 1 | 125 | 125 |
|
||||
| test.cpp:125:14:125:17 | call to safe | test.cpp:125:14:125:17 | call to safe | != | 1 | 125 | 125 |
|
||||
| test.cpp:125:14:125:17 | call to safe | test.cpp:125:14:125:17 | call to safe | == | 0 | 125 | 125 |
|
||||
| test.cpp:131:6:131:21 | call to __builtin_expect | test.cpp:131:6:131:21 | call to __builtin_expect | != | 0 | 131 | 132 |
|
||||
|
||||
Reference in New Issue
Block a user