mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Merge pull request #109 from dave-bartolomeo/dave/Call
C++: `Invoke` -> `Call`
This commit is contained in:
@@ -36,7 +36,7 @@ module InstructionSanity {
|
||||
opcode instanceof Opcode::ReturnValue and tag instanceof ReturnValueOperand or
|
||||
opcode instanceof Opcode::ThrowValue and tag instanceof ExceptionOperand or
|
||||
opcode instanceof Opcode::UnmodeledUse and tag instanceof UnmodeledUseOperand or
|
||||
opcode instanceof Opcode::Invoke and tag instanceof CallTargetOperand
|
||||
opcode instanceof Opcode::Call and tag instanceof CallTargetOperand
|
||||
)
|
||||
)
|
||||
}
|
||||
@@ -54,7 +54,7 @@ module InstructionSanity {
|
||||
query predicate unexpectedOperand(Instruction instr, OperandTag tag) {
|
||||
exists(instr.getOperand(tag)) and
|
||||
not expectsOperand(instr, tag) and
|
||||
not (instr instanceof InvokeInstruction and tag instanceof ArgumentOperand) and
|
||||
not (instr instanceof CallInstruction and tag instanceof ArgumentOperand) and
|
||||
not (instr instanceof BuiltInInstruction and tag instanceof PositionalArgumentOperand) and
|
||||
not (instr instanceof PhiInstruction and tag instanceof PhiOperand)
|
||||
}
|
||||
@@ -987,9 +987,9 @@ class SwitchInstruction extends Instruction {
|
||||
}
|
||||
}
|
||||
|
||||
class InvokeInstruction extends Instruction {
|
||||
InvokeInstruction() {
|
||||
opcode instanceof Opcode::Invoke
|
||||
class CallInstruction extends Instruction {
|
||||
CallInstruction() {
|
||||
opcode instanceof Opcode::Call
|
||||
}
|
||||
|
||||
final Instruction getCallTarget() {
|
||||
|
||||
@@ -46,7 +46,7 @@ private newtype TOpcode =
|
||||
TStringConstant() or
|
||||
TConditionalBranch() or
|
||||
TSwitch() or
|
||||
TInvoke() or
|
||||
TCall() or
|
||||
TCatchByType() or
|
||||
TCatchAny() or
|
||||
TThrowValue() or
|
||||
@@ -138,7 +138,7 @@ module Opcode {
|
||||
class StringConstant extends Opcode, TStringConstant { override final string toString() { result = "StringConstant" } }
|
||||
class ConditionalBranch extends OpcodeWithCondition, TConditionalBranch { override final string toString() { result = "ConditionalBranch" } }
|
||||
class Switch extends OpcodeWithCondition, TSwitch { override final string toString() { result = "Switch" } }
|
||||
class Invoke extends Opcode, TInvoke { override final string toString() { result = "Invoke" } }
|
||||
class Call extends Opcode, TCall { override final string toString() { result = "Call" } }
|
||||
class CatchByType extends CatchOpcode, TCatchByType { override final string toString() { result = "CatchByType" } }
|
||||
class CatchAny extends CatchOpcode, TCatchAny { override final string toString() { result = "CatchAny" } }
|
||||
class ThrowValue extends ThrowOpcode, MemoryAccessOpcode, TThrowValue { override final string toString() { result = "ThrowValue" } }
|
||||
|
||||
@@ -202,7 +202,7 @@ UnmodeledUseOperand unmodeledUseOperand() {
|
||||
}
|
||||
|
||||
/**
|
||||
* The operand representing the target function of an `Invoke` instruction.
|
||||
* The operand representing the target function of an `Call` instruction.
|
||||
*/
|
||||
class CallTargetOperand extends OperandTag, TCallTargetOperand {
|
||||
override final string toString() {
|
||||
|
||||
@@ -1793,7 +1793,7 @@ abstract class TranslatedCall extends TranslatedExpr {
|
||||
override predicate hasInstruction(Opcode opcode, InstructionTag tag,
|
||||
Type resultType, boolean isGLValue) {
|
||||
tag = CallTag() and
|
||||
opcode instanceof Opcode::Invoke and
|
||||
opcode instanceof Opcode::Call and
|
||||
resultType = getCallResultType() and
|
||||
isGLValue = false
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ module InstructionSanity {
|
||||
opcode instanceof Opcode::ReturnValue and tag instanceof ReturnValueOperand or
|
||||
opcode instanceof Opcode::ThrowValue and tag instanceof ExceptionOperand or
|
||||
opcode instanceof Opcode::UnmodeledUse and tag instanceof UnmodeledUseOperand or
|
||||
opcode instanceof Opcode::Invoke and tag instanceof CallTargetOperand
|
||||
opcode instanceof Opcode::Call and tag instanceof CallTargetOperand
|
||||
)
|
||||
)
|
||||
}
|
||||
@@ -54,7 +54,7 @@ module InstructionSanity {
|
||||
query predicate unexpectedOperand(Instruction instr, OperandTag tag) {
|
||||
exists(instr.getOperand(tag)) and
|
||||
not expectsOperand(instr, tag) and
|
||||
not (instr instanceof InvokeInstruction and tag instanceof ArgumentOperand) and
|
||||
not (instr instanceof CallInstruction and tag instanceof ArgumentOperand) and
|
||||
not (instr instanceof BuiltInInstruction and tag instanceof PositionalArgumentOperand) and
|
||||
not (instr instanceof PhiInstruction and tag instanceof PhiOperand)
|
||||
}
|
||||
@@ -987,9 +987,9 @@ class SwitchInstruction extends Instruction {
|
||||
}
|
||||
}
|
||||
|
||||
class InvokeInstruction extends Instruction {
|
||||
InvokeInstruction() {
|
||||
opcode instanceof Opcode::Invoke
|
||||
class CallInstruction extends Instruction {
|
||||
CallInstruction() {
|
||||
opcode instanceof Opcode::Call
|
||||
}
|
||||
|
||||
final Instruction getCallTarget() {
|
||||
|
||||
@@ -202,7 +202,7 @@ UnmodeledUseOperand unmodeledUseOperand() {
|
||||
}
|
||||
|
||||
/**
|
||||
* The operand representing the target function of an `Invoke` instruction.
|
||||
* The operand representing the target function of an `Call` instruction.
|
||||
*/
|
||||
class CallTargetOperand extends OperandTag, TCallTargetOperand {
|
||||
override final string toString() {
|
||||
|
||||
@@ -36,7 +36,7 @@ module InstructionSanity {
|
||||
opcode instanceof Opcode::ReturnValue and tag instanceof ReturnValueOperand or
|
||||
opcode instanceof Opcode::ThrowValue and tag instanceof ExceptionOperand or
|
||||
opcode instanceof Opcode::UnmodeledUse and tag instanceof UnmodeledUseOperand or
|
||||
opcode instanceof Opcode::Invoke and tag instanceof CallTargetOperand
|
||||
opcode instanceof Opcode::Call and tag instanceof CallTargetOperand
|
||||
)
|
||||
)
|
||||
}
|
||||
@@ -54,7 +54,7 @@ module InstructionSanity {
|
||||
query predicate unexpectedOperand(Instruction instr, OperandTag tag) {
|
||||
exists(instr.getOperand(tag)) and
|
||||
not expectsOperand(instr, tag) and
|
||||
not (instr instanceof InvokeInstruction and tag instanceof ArgumentOperand) and
|
||||
not (instr instanceof CallInstruction and tag instanceof ArgumentOperand) and
|
||||
not (instr instanceof BuiltInInstruction and tag instanceof PositionalArgumentOperand) and
|
||||
not (instr instanceof PhiInstruction and tag instanceof PhiOperand)
|
||||
}
|
||||
@@ -987,9 +987,9 @@ class SwitchInstruction extends Instruction {
|
||||
}
|
||||
}
|
||||
|
||||
class InvokeInstruction extends Instruction {
|
||||
InvokeInstruction() {
|
||||
opcode instanceof Opcode::Invoke
|
||||
class CallInstruction extends Instruction {
|
||||
CallInstruction() {
|
||||
opcode instanceof Opcode::Call
|
||||
}
|
||||
|
||||
final Instruction getCallTarget() {
|
||||
|
||||
@@ -202,7 +202,7 @@ UnmodeledUseOperand unmodeledUseOperand() {
|
||||
}
|
||||
|
||||
/**
|
||||
* The operand representing the target function of an `Invoke` instruction.
|
||||
* The operand representing the target function of an `Call` instruction.
|
||||
*/
|
||||
class CallTargetOperand extends OperandTag, TCallTargetOperand {
|
||||
override final string toString() {
|
||||
|
||||
Reference in New Issue
Block a user