mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
Merge branch 'main' into setliterals
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user