CodeQL library for C/C++
codeql/cpp-all 0.13.0 (changelog, source)
Search

Predicate FlowVar_internal::skipLoop

Holds if loop always assigns to v before leaving through an edge from bbInside in its condition to bbOutside outside the loop. Also, v must be used outside the loop.

Import path

import semmle.code.cpp.dataflow.internal.FlowVar
predicate skipLoop(SubBasicBlock sbbInside, SubBasicBlock sbbOutside, Variable v, AlwaysTrueUponEntryLoop loop)