mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
C++: Fix comment and prevent false positives on chiOnlyPartiallyUpdatesLocation when Alias::getEndBitOffset doesn't have known value.
This commit is contained in:
@@ -629,7 +629,11 @@ MemoryLocation getOperandMemoryLocation(MemoryOperand operand) {
|
||||
}
|
||||
|
||||
/** Gets the start bit offset of a `MemoryLocation`, if any. */
|
||||
int getStartBitOffset(VariableMemoryLocation location) { result = location.getStartBitOffset() }
|
||||
int getStartBitOffset(VariableMemoryLocation location) {
|
||||
result = location.getStartBitOffset() and Ints::hasValue(result)
|
||||
}
|
||||
|
||||
/** Gets the end bit offset of a `MemoryLocation`, if any. */
|
||||
int getEndBitOffset(VariableMemoryLocation location) { result = location.getEndBitOffset() }
|
||||
int getEndBitOffset(VariableMemoryLocation location) {
|
||||
result = location.getEndBitOffset() and Ints::hasValue(result)
|
||||
}
|
||||
|
||||
@@ -179,9 +179,9 @@ private module Cached {
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if the `ChiPartialOperand` totally, but not exactly, overlaps with the `ChiTotalOperand`.
|
||||
* This means that the `ChiPartialOperand` will not override the entire memory associated with the
|
||||
* `ChiTotalOperand`.
|
||||
* Holds if the `ChiPartialOperand` only partially overlaps with the `ChiTotalOperand`.
|
||||
* This means that the `ChiPartialOperand` will not override the entire memory associated
|
||||
* with the `ChiTotalOperand`.
|
||||
*/
|
||||
cached
|
||||
predicate chiOnlyPartiallyUpdatesLocation(ChiInstruction chi) {
|
||||
|
||||
@@ -179,9 +179,9 @@ private module Cached {
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if the `ChiPartialOperand` totally, but not exactly, overlaps with the `ChiTotalOperand`.
|
||||
* This means that the `ChiPartialOperand` will not override the entire memory associated with the
|
||||
* `ChiTotalOperand`.
|
||||
* Holds if the `ChiPartialOperand` only partially overlaps with the `ChiTotalOperand`.
|
||||
* This means that the `ChiPartialOperand` will not override the entire memory associated
|
||||
* with the `ChiTotalOperand`.
|
||||
*/
|
||||
cached
|
||||
predicate chiOnlyPartiallyUpdatesLocation(ChiInstruction chi) {
|
||||
|
||||
@@ -179,9 +179,9 @@ private module Cached {
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if the `ChiPartialOperand` totally, but not exactly, overlaps with the `ChiTotalOperand`.
|
||||
* This means that the `ChiPartialOperand` will not override the entire memory associated with the
|
||||
* `ChiTotalOperand`.
|
||||
* Holds if the `ChiPartialOperand` only partially overlaps with the `ChiTotalOperand`.
|
||||
* This means that the `ChiPartialOperand` will not override the entire memory associated
|
||||
* with the `ChiTotalOperand`.
|
||||
*/
|
||||
cached
|
||||
predicate chiOnlyPartiallyUpdatesLocation(ChiInstruction chi) {
|
||||
|
||||
Reference in New Issue
Block a user