Skip to content

Commit 82f9adc

Browse files
committed
Make the loop counter detection more relaxed
1 parent b13ffd2 commit 82f9adc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/common/src/codingstandards/cpp/Loops.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ class LegacyForLoopCondition extends RelationalOperation {
389389
Expr loopBound;
390390

391391
LegacyForLoopCondition() {
392-
loopCounter = this.getAnOperand() and
392+
loopCounter = this.getAnOperand().getAChild*() and
393393
loopBound = this.getAnOperand() and
394394
loopCounter.getTarget() = getAnIterationVariable(forLoop) and
395395
loopBound != loopCounter

0 commit comments

Comments
 (0)