File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
cpp/ql/lib/semmle/code/cpp/commons Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -33,18 +33,18 @@ predicate memberMayBeVarSize(Class c, MemberVariable v) {
3333 ) and
3434 // If the size is taken, then arithmetic is performed on the result at least once
3535 (
36+ // `sizeof(c)` is not taken
3637 not exists ( SizeofOperator so |
37- // `sizeof(c)` is taken
3838 so .( SizeofTypeOperator ) .getTypeOperand ( ) .getUnspecifiedType ( ) = c or
3939 so .( SizeofExprOperator ) .getExprOperand ( ) .getUnspecifiedType ( ) = c
4040 )
4141 or
42+ // or `sizeof(c)` is taken
4243 exists ( SizeofOperator so |
43- // `sizeof(c)` is taken
4444 so .( SizeofTypeOperator ) .getTypeOperand ( ) .getUnspecifiedType ( ) = c or
4545 so .( SizeofExprOperator ) .getExprOperand ( ) .getUnspecifiedType ( ) = c
4646 |
47- // arithmetic is performed on the result
47+ // and arithmetic is performed on the result
4848 so .getParent * ( ) instanceof AddExpr
4949 )
5050 )
You can’t perform that action at this time.
0 commit comments