Skip to content

Commit 0bc4b04

Browse files
author
Dave Bartolomeo
committed
C++: Remove unnecessary cast
1 parent 1d0cb04 commit 0bc4b04

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasAnalysis.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ private class IntValue = Ints::IntValue;
99
* effect. If `instr` is a `CallInstruction`, gets that same `CallInstruction`.
1010
*/
1111
private CallInstruction getPrimaryCall(Instruction instr) {
12-
result = instr.(CallInstruction)
12+
result = instr
1313
or
1414
result = instr.(SideEffectInstruction).getPrimaryInstruction()
1515
}

cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/AliasAnalysis.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ private class IntValue = Ints::IntValue;
99
* effect. If `instr` is a `CallInstruction`, gets that same `CallInstruction`.
1010
*/
1111
private CallInstruction getPrimaryCall(Instruction instr) {
12-
result = instr.(CallInstruction)
12+
result = instr
1313
or
1414
result = instr.(SideEffectInstruction).getPrimaryInstruction()
1515
}

csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasAnalysis.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ private class IntValue = Ints::IntValue;
99
* effect. If `instr` is a `CallInstruction`, gets that same `CallInstruction`.
1010
*/
1111
private CallInstruction getPrimaryCall(Instruction instr) {
12-
result = instr.(CallInstruction)
12+
result = instr
1313
or
1414
result = instr.(SideEffectInstruction).getPrimaryInstruction()
1515
}

0 commit comments

Comments
 (0)