mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
C++ IR: Fix SignAnalysis after getAnyDef -> getDef
In the `SignAnalysis` abstract interpretation, "unknown sign" corresponds to the set of _all_ `Sign`, but using `getDef` leads to the operand having _no_ `Sign`. To fix that, we assign all signs to inexact operands.
This commit is contained in:
@@ -368,6 +368,9 @@ cached module SignAnalysisCached {
|
||||
or
|
||||
result = guardedOperandSign(operand) and
|
||||
result = guardedOperandSignOk(operand)
|
||||
or
|
||||
// `result` is unconstrained if the definition is inexact. Then any sign is possible.
|
||||
operand.isDefinitionInexact()
|
||||
}
|
||||
|
||||
cached
|
||||
|
||||
Reference in New Issue
Block a user