mirror of
https://github.com/github/codeql.git
synced 2026-04-25 08:45:14 +02:00
C++: While here, let's avoid materializing 'ensuresEq' and 'ensuresLt' when computing unreachable nodes in dataflow.
This commit is contained in:
@@ -1237,12 +1237,14 @@ module IsUnreachableInCall {
|
||||
int getValue() { result = value }
|
||||
}
|
||||
|
||||
pragma[nomagic]
|
||||
bindingset[right]
|
||||
pragma[inline_late]
|
||||
private predicate ensuresEq(Operand left, Operand right, int k, IRBlock block, boolean areEqual) {
|
||||
any(G::IRGuardCondition guard).ensuresEq(left, right, k, block, areEqual)
|
||||
}
|
||||
|
||||
pragma[nomagic]
|
||||
bindingset[right]
|
||||
pragma[inline_late]
|
||||
private predicate ensuresLt(Operand left, Operand right, int k, IRBlock block, boolean areEqual) {
|
||||
any(G::IRGuardCondition guard).ensuresLt(left, right, k, block, areEqual)
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ class ValueNumber extends TValueNumber {
|
||||
/**
|
||||
* Gets an `Operand` whose definition is exact and has this value number.
|
||||
*/
|
||||
pragma[nomagic]
|
||||
final Operand getAUse() { this = valueNumber(result.getDef()) }
|
||||
|
||||
final string getKind() {
|
||||
|
||||
Reference in New Issue
Block a user