C++: Implement copilot suggestions.

This commit is contained in:
Mathias Vorreiter Pedersen
2026-01-27 19:02:28 +00:00
parent 28fec0c129
commit 4503c625b4

View File

@@ -16,7 +16,7 @@ import SsaImplCommon
private module SourceVariables {
/**
* Holds if `store` is the `StoreInstruction` generated by an postfix
* Holds if `store` is the `StoreInstruction` generated by n postfix
* increment or decrement operation `e`, and `postCrement` is the operand
* that represents the use of the evaluated value of `e`.
*/
@@ -686,7 +686,7 @@ class FinalParameterUse extends UseImpl, TFinalParameterUse {
}
pragma[nomagic]
private predicate hasBaseSourceVariableAndIndirectrion(BaseIRVariable v, int indirection) {
private predicate hasBaseSourceVariableAndIndirection(BaseIRVariable v, int indirection) {
v.getIRVariable().getAst() = p and
indirection = this.getIndirection()
}
@@ -694,7 +694,7 @@ class FinalParameterUse extends UseImpl, TFinalParameterUse {
override NormalSourceVariable getSourceVariable() {
exists(BaseIRVariable v, int indirection |
sourceVariableHasBaseAndIndex(result, v, indirection) and
this.hasBaseSourceVariableAndIndirectrion(v, indirection)
this.hasBaseSourceVariableAndIndirection(v, indirection)
)
}
}