Skip to content

Commit 438cc96

Browse files
committed
C++: Document TranslatedSizeofExpr
1 parent 8a75532 commit 438cc96

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4103,6 +4103,10 @@ private VlaDeclStmt getVlaDeclStmt(Expr expr, int pointerDerefCount) {
41034103
result = getVlaDeclStmt(expr.(ArrayExpr).getArrayBase(), pointerDerefCount - 1)
41044104
}
41054105

4106+
/**
4107+
* The IR translation of `SizeofExprOperator` when its result is non-constant, i.e.,
4108+
* when the operand expression refers to a variable length array.
4109+
*/
41064110
class TranslatedSizeofExpr extends TranslatedNonConstantExpr {
41074111
override SizeofExprOperator expr;
41084112
VlaDeclStmt vlaDeclStmt;

0 commit comments

Comments
 (0)