mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
C++: Fix Operand.getSize()
This commit is contained in:
@@ -21,10 +21,14 @@ class Operand extends TOperand {
|
||||
result = "Operand"
|
||||
}
|
||||
|
||||
Location getLocation() {
|
||||
final Location getLocation() {
|
||||
result = getUseInstruction().getLocation()
|
||||
}
|
||||
|
||||
final FunctionIR getEnclosingFunctionIR() {
|
||||
result = getUseInstruction().getEnclosingFunctionIR()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `Instruction` that consumes this operand.
|
||||
*/
|
||||
@@ -91,7 +95,7 @@ class Operand extends TOperand {
|
||||
* a known constant size, this predicate does not hold.
|
||||
*/
|
||||
int getSize() {
|
||||
result = getDefinitionInstruction().getResultSize()
|
||||
result = getType().getSize()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,10 +21,14 @@ class Operand extends TOperand {
|
||||
result = "Operand"
|
||||
}
|
||||
|
||||
Location getLocation() {
|
||||
final Location getLocation() {
|
||||
result = getUseInstruction().getLocation()
|
||||
}
|
||||
|
||||
final FunctionIR getEnclosingFunctionIR() {
|
||||
result = getUseInstruction().getEnclosingFunctionIR()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `Instruction` that consumes this operand.
|
||||
*/
|
||||
@@ -91,7 +95,7 @@ class Operand extends TOperand {
|
||||
* a known constant size, this predicate does not hold.
|
||||
*/
|
||||
int getSize() {
|
||||
result = getDefinitionInstruction().getResultSize()
|
||||
result = getType().getSize()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,10 +21,14 @@ class Operand extends TOperand {
|
||||
result = "Operand"
|
||||
}
|
||||
|
||||
Location getLocation() {
|
||||
final Location getLocation() {
|
||||
result = getUseInstruction().getLocation()
|
||||
}
|
||||
|
||||
final FunctionIR getEnclosingFunctionIR() {
|
||||
result = getUseInstruction().getEnclosingFunctionIR()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `Instruction` that consumes this operand.
|
||||
*/
|
||||
@@ -91,7 +95,7 @@ class Operand extends TOperand {
|
||||
* a known constant size, this predicate does not hold.
|
||||
*/
|
||||
int getSize() {
|
||||
result = getDefinitionInstruction().getResultSize()
|
||||
result = getType().getSize()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user