mirror of
https://github.com/github/codeql.git
synced 2026-01-30 23:02:56 +01:00
Improve documentation
This commit is contained in:
committed by
Owen Mansel-Chan
parent
6645613eb8
commit
204e313c3b
@@ -376,7 +376,7 @@ class StructType extends @structtype, CompositeType {
|
||||
}
|
||||
|
||||
/**
|
||||
* hasEmbeddedField holds if there is an embedded field at int `depth`, with either type `tp` or `tp`'s pointer type.
|
||||
* Holds if there is an embedded field at `depth`, with either type `tp` or a pointer to `tp`.
|
||||
*/
|
||||
private predicate hasEmbeddedField(Type tp, int depth) {
|
||||
exists(Field f | this.hasFieldCand(_, f, depth, true) |
|
||||
@@ -386,7 +386,7 @@ class StructType extends @structtype, CompositeType {
|
||||
}
|
||||
|
||||
/**
|
||||
* getFieldOfEmbedded gets a field of `embeddedParent`, which is then embedded into this struct type.
|
||||
* Gets a field of `embeddedParent`, which is then embedded into this struct type.
|
||||
*/
|
||||
Field getFieldOfEmbedded(Field embeddedParent, string name, int depth, boolean isEmbedded) {
|
||||
// embeddedParent is a field of 'this' at depth 'depth - 1'
|
||||
|
||||
@@ -368,8 +368,16 @@ module IR {
|
||||
|
||||
ImplicitFieldReadInstruction() { this = MkImplicitFieldSelection(e, _, implicitField) }
|
||||
|
||||
/**
|
||||
* Gets the selector expression that requires this implicit field read.
|
||||
*/
|
||||
SelectorExpr getSelectorExpr() { result = e }
|
||||
|
||||
/**
|
||||
* Gets the field being read. Note this is an embedded field that is not explicitly specified
|
||||
* in `getSelectorExpr()`, whereas the field `getSelectorExpr()` refers to is the promoted field
|
||||
* contained within this embedded field or in turn within a field that it embeds.
|
||||
*/
|
||||
Field getField() { result = implicitField }
|
||||
|
||||
override predicate reads(ValueEntity v) { v = implicitField }
|
||||
|
||||
Reference in New Issue
Block a user