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:
Jonas Jensen
2019-07-11 15:17:55 +02:00
parent 52cfbffb95
commit c831c4b58e

View File

@@ -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