Merge pull request #6994 from erik-krogh/redundant-cast

Approved by RasmusWL, aschackmull, esbena, geoffw0, hvitved, nickrolfe
This commit is contained in:
CodeQL CI
2021-11-02 03:45:48 -07:00
committed by GitHub
78 changed files with 131 additions and 163 deletions

View File

@@ -14,9 +14,7 @@ import semmle.code.cpp.controlflow.SSA
select count(SsaDefinition d, StackVariable v, Expr u |
d.getAUse(v) = u and
not exists(BasicBlock bd, BasicBlock bu |
bd.contains(mkElement(d).(ControlFlowNode)) and bu.contains(u)
|
not exists(BasicBlock bd, BasicBlock bu | bd.contains(mkElement(d)) and bu.contains(u) |
bbStrictlyDominates(bd, bu)
or
exists(int i, int j |

View File

@@ -14,9 +14,7 @@ import semmle.code.cpp.rangeanalysis.RangeSSA
select count(RangeSsaDefinition d, StackVariable v, Expr u |
d.getAUse(v) = u and
not exists(BasicBlock bd, BasicBlock bu |
bd.contains(mkElement(d).(ControlFlowNode)) and bu.contains(u)
|
not exists(BasicBlock bd, BasicBlock bu | bd.contains(mkElement(d)) and bu.contains(u) |
bbStrictlyDominates(bd, bu)
or
exists(int i, int j |