Skip to content

Commit 47ff38e

Browse files
committed
CPP: Add a warning to getFollowingStmt.
1 parent ef3ceb5 commit 47ff38e

File tree

1 file changed

+4
-0
lines changed
  • cpp/ql/src/semmle/code/cpp/stmts

1 file changed

+4
-0
lines changed

cpp/ql/src/semmle/code/cpp/stmts/Stmt.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ class Stmt extends StmtParent, @stmt {
4545

4646
/**
4747
* Gets the statement following this statement in the same block, if any.
48+
*
49+
* Note that this is not widely useful, because this doesn't have a result for
50+
* the last statement of a block. Consider using the `ControlFlowNode` class
51+
* to trace the flow of control instead.
4852
*/
4953
Stmt getFollowingStmt() {
5054
exists(Block b, int i | this = b.getStmt(i) and

0 commit comments

Comments
 (0)