Files
codeql/cpp/ql/test/library-tests/controlflow/guards/GuardsControl.ql
2018-08-02 17:53:23 +01:00

18 lines
380 B
Plaintext

/**
* @name Guards control test
* @description List which guards control which blocks
* @kind test
*/
import cpp
import semmle.code.cpp.controlflow.Guards
from GuardCondition guard, boolean sense, int start, int end
where
exists(BasicBlock block |
guard.controls(block, sense) and
block.hasLocationInfo(_, start, _, end, _)
)
select guard, sense, start, end