We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9854b95 commit 0aded15Copy full SHA for 0aded15
csharp/ql/src/Likely Bugs/NestedLoopsSameVariable.ql
@@ -28,7 +28,8 @@ class NestedForConditions extends SC::StructuralComparisonConfiguration {
28
}
29
30
private predicate hasChild(Stmt outer, Element child) {
31
- outer = child.getParent()
+ outer = child.getParent() and
32
+ (outer instanceof ForStmt or outer = any(ForStmt f).getBody())
33
or
34
hasChild(outer, child.getParent())
35
0 commit comments