mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
C++: add function info to duplicateChiOperand
This commit is contained in:
@@ -120,7 +120,15 @@ module InstructionSanity {
|
||||
)
|
||||
}
|
||||
|
||||
query predicate duplicateChiOperand(ChiInstruction chi) { chi.getTotal() = chi.getPartial() }
|
||||
query predicate duplicateChiOperand(
|
||||
ChiInstruction chi, string message, IRFunction func, string funcText
|
||||
) {
|
||||
chi.getTotal() = chi.getPartial() and
|
||||
message = "Chi instruction for " + chi.getPartial().toString() +
|
||||
" has duplicate operands in function $@" and
|
||||
func = chi.getEnclosingIRFunction() and
|
||||
funcText = Language::getIdentityString(func.getFunction())
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if an instruction, other than `ExitFunction`, has no successors.
|
||||
|
||||
@@ -120,7 +120,15 @@ module InstructionSanity {
|
||||
)
|
||||
}
|
||||
|
||||
query predicate duplicateChiOperand(ChiInstruction chi) { chi.getTotal() = chi.getPartial() }
|
||||
query predicate duplicateChiOperand(
|
||||
ChiInstruction chi, string message, IRFunction func, string funcText
|
||||
) {
|
||||
chi.getTotal() = chi.getPartial() and
|
||||
message = "Chi instruction for " + chi.getPartial().toString() +
|
||||
" has duplicate operands in function $@" and
|
||||
func = chi.getEnclosingIRFunction() and
|
||||
funcText = Language::getIdentityString(func.getFunction())
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if an instruction, other than `ExitFunction`, has no successors.
|
||||
|
||||
@@ -120,7 +120,15 @@ module InstructionSanity {
|
||||
)
|
||||
}
|
||||
|
||||
query predicate duplicateChiOperand(ChiInstruction chi) { chi.getTotal() = chi.getPartial() }
|
||||
query predicate duplicateChiOperand(
|
||||
ChiInstruction chi, string message, IRFunction func, string funcText
|
||||
) {
|
||||
chi.getTotal() = chi.getPartial() and
|
||||
message = "Chi instruction for " + chi.getPartial().toString() +
|
||||
" has duplicate operands in function $@" and
|
||||
func = chi.getEnclosingIRFunction() and
|
||||
funcText = Language::getIdentityString(func.getFunction())
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if an instruction, other than `ExitFunction`, has no successors.
|
||||
|
||||
Reference in New Issue
Block a user