mirror of
https://github.com/github/codeql.git
synced 2026-05-03 20:58:03 +02:00
CPP: Support builtin offsetof.
This commit is contained in:
committed by
Robert Marsh
parent
79ff559f7a
commit
313624fd2e
@@ -39,6 +39,9 @@ predicate memberMayBeVarSize(Class c, MemberVariable v) {
|
||||
) or exists(AddressOfExpr aoe |
|
||||
// `&(c.v)` is taken
|
||||
aoe.getAddressable() = v
|
||||
) or exists(BuiltInOperationOffsetOf oo |
|
||||
// `offsetof(c, v)` using a builtin
|
||||
oo.getAChild().(VariableAccess).getTarget() = v
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user