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
Родитель 52cfbffb95
Коммит c831c4b58e
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -368,6 +368,9 @@ cached module SignAnalysisCached {
or or
result = guardedOperandSign(operand) and result = guardedOperandSign(operand) and
result = guardedOperandSignOk(operand) result = guardedOperandSignOk(operand)
or
// `result` is unconstrained if the definition is inexact. Then any sign is possible.
operand.isDefinitionInexact()
} }
cached cached