@@ -145,22 +145,22 @@ OutNode getAnOutNode(DataFlowCall call, ReturnKind kind) {
145145predicate jumpStep ( Node n1 , Node n2 ) { none ( ) }
146146
147147/**
148- * Gets the field corresponding to the bit range `[startBit..endBit)` of class `c`.
148+ * Gets a field corresponding to the bit range `[startBit..endBit)` of class `c`, if any .
149149 */
150- private Field getField ( Class c , int startBit , int endBit ) {
150+ private Field getAField ( Class c , int startBit , int endBit ) {
151151 result .getDeclaringType ( ) = c and
152152 startBit = 8 * result .getByteOffset ( ) and
153153 endBit = 8 * result .getType ( ) .getSize ( ) + startBit
154154 or
155155 exists ( Field f , Class cInner |
156156 f = c .getAField ( ) and
157157 cInner = f .getUnderlyingType ( ) and
158- result = getField ( cInner , startBit - 8 * f .getByteOffset ( ) , endBit - 8 * f .getByteOffset ( ) )
158+ result = getAField ( cInner , startBit - 8 * f .getByteOffset ( ) , endBit - 8 * f .getByteOffset ( ) )
159159 )
160160}
161161
162162private newtype TContent =
163- TFieldContent ( Class c , int startBit , int endBit ) { exists ( getField ( c , startBit , endBit ) ) } or
163+ TFieldContent ( Class c , int startBit , int endBit ) { exists ( getAField ( c , startBit , endBit ) ) } or
164164 TCollectionContent ( ) or
165165 TArrayContent ( )
166166
@@ -185,11 +185,11 @@ private class FieldContent extends Content, TFieldContent {
185185 FieldContent ( ) { this = TFieldContent ( c , startBit , endBit ) }
186186
187187 // Ensure that there's just 1 result for `toString`.
188- override string toString ( ) { result = min ( Field f | f = getField ( ) | f .toString ( ) ) }
188+ override string toString ( ) { result = min ( Field f | f = getAField ( ) | f .toString ( ) ) }
189189
190190 predicate hasOffset ( Class cl , int start , int end ) { cl = c and start = startBit and end = endBit }
191191
192- Field getField ( ) { result = getField ( c , startBit , endBit ) }
192+ Field getAField ( ) { result = getAField ( c , startBit , endBit ) }
193193}
194194
195195private class CollectionContent extends Content , TCollectionContent {
@@ -204,7 +204,7 @@ private predicate storeStepNoChi(Node node1, Content f, PostUpdateNode node2) {
204204 exists ( StoreInstruction store , Class c |
205205 store = node2 .asInstruction ( ) and
206206 store .getSourceValue ( ) = node1 .asInstruction ( ) and
207- getWrittenField ( store , f .( FieldContent ) .getField ( ) , c ) and
207+ getWrittenField ( store , f .( FieldContent ) .getAField ( ) , c ) and
208208 f .( FieldContent ) .hasOffset ( c , _, _)
209209 )
210210}
@@ -230,7 +230,7 @@ private predicate storeStepChi(Node node1, Content f, PostUpdateNode node2) {
230230 f .( FieldContent ) .hasOffset ( c , startBit , endBit )
231231 )
232232 or
233- getWrittenField ( store , f .( FieldContent ) .getField ( ) , c ) and
233+ getWrittenField ( store , f .( FieldContent ) .getAField ( ) , c ) and
234234 f .( FieldContent ) .hasOffset ( c , _, _)
235235 )
236236 )
@@ -274,7 +274,7 @@ predicate readStep(Node node1, Content f, Node node2) {
274274 f .( FieldContent ) .hasOffset ( c , startBit , endBit )
275275 )
276276 or
277- getLoadedField ( load , f .( FieldContent ) .getField ( ) , c ) and
277+ getLoadedField ( load , f .( FieldContent ) .getAField ( ) , c ) and
278278 f .( FieldContent ) .hasOffset ( c , _, _)
279279 )
280280 )
0 commit comments