mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
C++ IR: Rename getters for def/use on Operand
This renames `getDefinitionInstruction` to `getAnyDef`, reflecting that
it includes definitions without exact overlap. It renames
`getUseInstruction` to `getUse` for consistency.
perl -p -i -e 's/\bgetUseInstruction\b/getUse/g; s/\bgetDefinitionInstruction\b/getAnyDef/g' \
cpp/ql/src/semmle/code/cpp/ir/**/*.ql* \
cpp/ql/test/**/*.ql* \
cpp/ql/src/semmle/code/cpp/rangeanalysis/**/*.ql*
This commit is contained in:
@@ -65,7 +65,7 @@ query predicate irGuardsCompare(int startLine, string msg) {
|
||||
guard.comparesEq(left, right, k, false, sense) and op = " != "
|
||||
)
|
||||
and startLine = guard.getLocation().getStartLine()
|
||||
and msg = left.getDefinitionInstruction().getUnconvertedResultExpression() + op + right.getDefinitionInstruction().getUnconvertedResultExpression() + "+" + k + " when " + guard + " is " + which
|
||||
and msg = left.getAnyDef().getUnconvertedResultExpression() + op + right.getAnyDef().getUnconvertedResultExpression() + "+" + k + " when " + guard + " is " + which
|
||||
)
|
||||
}
|
||||
query predicate irGuardsControl(IRGuardCondition guard, boolean sense, int start, int end) {
|
||||
|
||||
Reference in New Issue
Block a user