Merge branch 'main' into setliterals

This commit is contained in:
Geoffrey White
2021-10-14 14:39:39 +01:00
216 changed files with 9196 additions and 2926 deletions

View File

@@ -50,10 +50,7 @@ where
// If either of the operands is constant, then don't include it.
(
if cmp.getLeftOperand().isConstant()
then
if cmp.getRightOperand().isConstant()
then none() // Both operands are constant so don't create a message.
else reason = rightReason
then not cmp.getRightOperand().isConstant() and reason = rightReason
else
if cmp.getRightOperand().isConstant()
then reason = leftReason

View File

@@ -121,16 +121,14 @@ predicate exprSourceType(Expr use, Type sourceType, Location sourceLoc) {
else
if use instanceof CrementOperation
then exprSourceType(use.(CrementOperation).getOperand(), sourceType, sourceLoc)
else
else (
// Conversions are not in the AST, so ignore them.
if use instanceof Conversion
then none()
else (
// Source expressions
sourceType = use.getUnspecifiedType() and
isPointerType(sourceType) and
sourceLoc = use.getLocation()
)
not use instanceof Conversion and
// Source expressions
sourceType = use.getUnspecifiedType() and
isPointerType(sourceType) and
sourceLoc = use.getLocation()
)
}
/**