mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
C++: Fix merge conflicts
This commit is contained in:
@@ -50,7 +50,7 @@ module InstructionSanity {
|
||||
/**
|
||||
* Holds if instruction `instr` is missing an expected operand with tag `tag`.
|
||||
*/
|
||||
query predicate missingOperand(Instruction instr, string message, FunctionIR func, string funcText) {
|
||||
query predicate missingOperand(Instruction instr, string message, IRFunction func, string funcText) {
|
||||
exists(OperandTag tag |
|
||||
expectsOperand(instr, tag) and
|
||||
not exists(NonPhiOperand operand |
|
||||
@@ -59,7 +59,7 @@ module InstructionSanity {
|
||||
) and
|
||||
message = "Instruction '" + instr.getOpcode().toString() + "' is missing an expected operand with tag '" +
|
||||
tag.toString() + "' in function '$@'." and
|
||||
func = instr.getEnclosingFunctionIR() and
|
||||
func = instr.getEnclosingIRFunction() and
|
||||
funcText = getIdentityString(func.getFunction())
|
||||
)
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ class Operand extends TOperand {
|
||||
result = getUseInstruction().getLocation()
|
||||
}
|
||||
|
||||
final FunctionIR getEnclosingFunctionIR() {
|
||||
result = getUseInstruction().getEnclosingFunctionIR()
|
||||
final IRFunction getEnclosingIRFunction() {
|
||||
result = getUseInstruction().getEnclosingIRFunction()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -417,13 +417,13 @@ class SideEffectOperand extends TypedOperand {
|
||||
/**
|
||||
* An operand of a `PhiInstruction`.
|
||||
*/
|
||||
class PhiOperand extends MemoryOperand, TPhiOperand {
|
||||
class PhiInputOperand extends MemoryOperand, TPhiOperand {
|
||||
PhiInstruction useInstr;
|
||||
Instruction defInstr;
|
||||
IRBlock predecessorBlock;
|
||||
Overlap overlap;
|
||||
|
||||
PhiOperand() {
|
||||
PhiInputOperand() {
|
||||
this = TPhiOperand(useInstr, defInstr, predecessorBlock, overlap)
|
||||
}
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@ private newtype TMemoryLocation =
|
||||
hasOperandMemoryAccess(_, var, type, startBitOffset, endBitOffset)
|
||||
}
|
||||
or
|
||||
TUnknownMemoryLocation(FunctionIR funcIR) or
|
||||
TUnknownVirtualVariable(FunctionIR funcIR)
|
||||
TUnknownMemoryLocation(IRFunction funcIR) or
|
||||
TUnknownVirtualVariable(IRFunction funcIR)
|
||||
|
||||
/**
|
||||
* Represents the memory location accessed by a memory operand or memory result. In this implementation, the location is
|
||||
@@ -99,7 +99,7 @@ class VariableMemoryLocation extends TVariableMemoryLocation, MemoryLocation {
|
||||
|
||||
override final VirtualVariable getVirtualVariable() {
|
||||
if variableAddressEscapes(var) then
|
||||
result = TUnknownVirtualVariable(var.getEnclosingFunctionIR())
|
||||
result = TUnknownVirtualVariable(var.getEnclosingIRFunction())
|
||||
else
|
||||
result = TVariableMemoryLocation(var, var.getType(), 0, var.getType().getSize() * 8)
|
||||
}
|
||||
@@ -130,7 +130,7 @@ class VariableVirtualVariable extends VariableMemoryLocation, VirtualVariable {
|
||||
* An access to memory that is not known to be confined to a specific `IRVariable`.
|
||||
*/
|
||||
class UnknownMemoryLocation extends TUnknownMemoryLocation, MemoryLocation {
|
||||
FunctionIR funcIR;
|
||||
IRFunction funcIR;
|
||||
|
||||
UnknownMemoryLocation() {
|
||||
this = TUnknownMemoryLocation(funcIR)
|
||||
@@ -157,7 +157,7 @@ class UnknownMemoryLocation extends TUnknownMemoryLocation, MemoryLocation {
|
||||
* An access to all aliased memory.
|
||||
*/
|
||||
class UnknownVirtualVariable extends TUnknownVirtualVariable, VirtualVariable {
|
||||
FunctionIR funcIR;
|
||||
IRFunction funcIR;
|
||||
|
||||
UnknownVirtualVariable() {
|
||||
this = TUnknownVirtualVariable(funcIR)
|
||||
@@ -247,16 +247,16 @@ MemoryLocation getResultMemoryLocation(Instruction instr) {
|
||||
)
|
||||
)
|
||||
else (
|
||||
result = TUnknownMemoryLocation(instr.getEnclosingFunctionIR())
|
||||
result = TUnknownMemoryLocation(instr.getEnclosingIRFunction())
|
||||
)
|
||||
) or
|
||||
(
|
||||
kind instanceof EscapedMemoryAccess and
|
||||
result = TUnknownVirtualVariable(instr.getEnclosingFunctionIR())
|
||||
result = TUnknownVirtualVariable(instr.getEnclosingIRFunction())
|
||||
) or
|
||||
(
|
||||
kind instanceof EscapedMayMemoryAccess and
|
||||
result = TUnknownMemoryLocation(instr.getEnclosingFunctionIR())
|
||||
result = TUnknownMemoryLocation(instr.getEnclosingIRFunction())
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -275,16 +275,16 @@ MemoryLocation getOperandMemoryLocation(MemoryOperand operand) {
|
||||
)
|
||||
)
|
||||
else (
|
||||
result = TUnknownMemoryLocation(operand.getEnclosingFunctionIR())
|
||||
result = TUnknownMemoryLocation(operand.getEnclosingIRFunction())
|
||||
)
|
||||
) or
|
||||
(
|
||||
kind instanceof EscapedMemoryAccess and
|
||||
result = TUnknownVirtualVariable(operand.getEnclosingFunctionIR())
|
||||
result = TUnknownVirtualVariable(operand.getEnclosingIRFunction())
|
||||
) or
|
||||
(
|
||||
kind instanceof EscapedMayMemoryAccess and
|
||||
result = TUnknownMemoryLocation(operand.getEnclosingFunctionIR())
|
||||
result = TUnknownMemoryLocation(operand.getEnclosingIRFunction())
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -16,7 +16,7 @@ cached private module Cached {
|
||||
}
|
||||
|
||||
cached predicate functionHasIR(Function func) {
|
||||
exists(OldIR::FunctionIR funcIR |
|
||||
exists(OldIR::IRFunction funcIR |
|
||||
funcIR.getFunction() = func
|
||||
)
|
||||
}
|
||||
@@ -92,7 +92,7 @@ cached private module Cached {
|
||||
)
|
||||
)
|
||||
else (
|
||||
result = instruction.getEnclosingFunctionIR().getUnmodeledDefinitionInstruction() and
|
||||
result = instruction.getEnclosingIRFunction().getUnmodeledDefinitionInstruction() and
|
||||
overlap instanceof MustTotallyOverlap
|
||||
)
|
||||
) or
|
||||
@@ -112,7 +112,7 @@ cached private module Cached {
|
||||
tag instanceof ChiPartialOperandTag and
|
||||
overlap instanceof MustExactlyOverlap
|
||||
or
|
||||
exists(FunctionIR f |
|
||||
exists(IRFunction f |
|
||||
tag instanceof UnmodeledUseOperandTag and
|
||||
result = f.getUnmodeledDefinitionInstruction() and
|
||||
instruction = f.getUnmodeledUseInstruction() and
|
||||
@@ -288,7 +288,7 @@ cached private module Cached {
|
||||
result instanceof Opcode::Unreached
|
||||
}
|
||||
|
||||
cached FunctionIR getInstructionEnclosingFunctionIR(Instruction instruction) {
|
||||
cached IRFunction getInstructionEnclosingIRFunction(Instruction instruction) {
|
||||
exists(OldInstruction oldInstruction |
|
||||
instruction = WrappedInstruction(oldInstruction)
|
||||
or
|
||||
|
||||
@@ -50,7 +50,7 @@ module InstructionSanity {
|
||||
/**
|
||||
* Holds if instruction `instr` is missing an expected operand with tag `tag`.
|
||||
*/
|
||||
query predicate missingOperand(Instruction instr, string message, FunctionIR func, string funcText) {
|
||||
query predicate missingOperand(Instruction instr, string message, IRFunction func, string funcText) {
|
||||
exists(OperandTag tag |
|
||||
expectsOperand(instr, tag) and
|
||||
not exists(NonPhiOperand operand |
|
||||
@@ -59,7 +59,7 @@ module InstructionSanity {
|
||||
) and
|
||||
message = "Instruction '" + instr.getOpcode().toString() + "' is missing an expected operand with tag '" +
|
||||
tag.toString() + "' in function '$@'." and
|
||||
func = instr.getEnclosingFunctionIR() and
|
||||
func = instr.getEnclosingIRFunction() and
|
||||
funcText = getIdentityString(func.getFunction())
|
||||
)
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ class Operand extends TOperand {
|
||||
result = getUseInstruction().getLocation()
|
||||
}
|
||||
|
||||
final FunctionIR getEnclosingFunctionIR() {
|
||||
result = getUseInstruction().getEnclosingFunctionIR()
|
||||
final IRFunction getEnclosingIRFunction() {
|
||||
result = getUseInstruction().getEnclosingIRFunction()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -417,13 +417,13 @@ class SideEffectOperand extends TypedOperand {
|
||||
/**
|
||||
* An operand of a `PhiInstruction`.
|
||||
*/
|
||||
class PhiOperand extends MemoryOperand, TPhiOperand {
|
||||
class PhiInputOperand extends MemoryOperand, TPhiOperand {
|
||||
PhiInstruction useInstr;
|
||||
Instruction defInstr;
|
||||
IRBlock predecessorBlock;
|
||||
Overlap overlap;
|
||||
|
||||
PhiOperand() {
|
||||
PhiInputOperand() {
|
||||
this = TPhiOperand(useInstr, defInstr, predecessorBlock, overlap)
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ module InstructionSanity {
|
||||
/**
|
||||
* Holds if instruction `instr` is missing an expected operand with tag `tag`.
|
||||
*/
|
||||
query predicate missingOperand(Instruction instr, string message, FunctionIR func, string funcText) {
|
||||
query predicate missingOperand(Instruction instr, string message, IRFunction func, string funcText) {
|
||||
exists(OperandTag tag |
|
||||
expectsOperand(instr, tag) and
|
||||
not exists(NonPhiOperand operand |
|
||||
@@ -59,7 +59,7 @@ module InstructionSanity {
|
||||
) and
|
||||
message = "Instruction '" + instr.getOpcode().toString() + "' is missing an expected operand with tag '" +
|
||||
tag.toString() + "' in function '$@'." and
|
||||
func = instr.getEnclosingFunctionIR() and
|
||||
func = instr.getEnclosingIRFunction() and
|
||||
funcText = getIdentityString(func.getFunction())
|
||||
)
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ class Operand extends TOperand {
|
||||
result = getUseInstruction().getLocation()
|
||||
}
|
||||
|
||||
final FunctionIR getEnclosingFunctionIR() {
|
||||
result = getUseInstruction().getEnclosingFunctionIR()
|
||||
final IRFunction getEnclosingIRFunction() {
|
||||
result = getUseInstruction().getEnclosingIRFunction()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -417,13 +417,13 @@ class SideEffectOperand extends TypedOperand {
|
||||
/**
|
||||
* An operand of a `PhiInstruction`.
|
||||
*/
|
||||
class PhiOperand extends MemoryOperand, TPhiOperand {
|
||||
class PhiInputOperand extends MemoryOperand, TPhiOperand {
|
||||
PhiInstruction useInstr;
|
||||
Instruction defInstr;
|
||||
IRBlock predecessorBlock;
|
||||
Overlap overlap;
|
||||
|
||||
PhiOperand() {
|
||||
PhiInputOperand() {
|
||||
this = TPhiOperand(useInstr, defInstr, predecessorBlock, overlap)
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ cached private module Cached {
|
||||
}
|
||||
|
||||
cached predicate functionHasIR(Function func) {
|
||||
exists(OldIR::FunctionIR funcIR |
|
||||
exists(OldIR::IRFunction funcIR |
|
||||
funcIR.getFunction() = func
|
||||
)
|
||||
}
|
||||
@@ -92,7 +92,7 @@ cached private module Cached {
|
||||
)
|
||||
)
|
||||
else (
|
||||
result = instruction.getEnclosingFunctionIR().getUnmodeledDefinitionInstruction() and
|
||||
result = instruction.getEnclosingIRFunction().getUnmodeledDefinitionInstruction() and
|
||||
overlap instanceof MustTotallyOverlap
|
||||
)
|
||||
) or
|
||||
@@ -112,7 +112,7 @@ cached private module Cached {
|
||||
tag instanceof ChiPartialOperandTag and
|
||||
overlap instanceof MustExactlyOverlap
|
||||
or
|
||||
exists(FunctionIR f |
|
||||
exists(IRFunction f |
|
||||
tag instanceof UnmodeledUseOperandTag and
|
||||
result = f.getUnmodeledDefinitionInstruction() and
|
||||
instruction = f.getUnmodeledUseInstruction() and
|
||||
@@ -288,7 +288,7 @@ cached private module Cached {
|
||||
result instanceof Opcode::Unreached
|
||||
}
|
||||
|
||||
cached FunctionIR getInstructionEnclosingFunctionIR(Instruction instruction) {
|
||||
cached IRFunction getInstructionEnclosingIRFunction(Instruction instruction) {
|
||||
exists(OldInstruction oldInstruction |
|
||||
instruction = WrappedInstruction(oldInstruction)
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user