MCPcopy Create free account
hub / github.com/Samsung/UTopia / collectRelatedLengthField

Method collectRelatedLengthField

lib/propanalysis/ArgFlow.cpp:316–321  ·  view source on GitHub ↗

Used for analyze ArrayLen First tracking the value used as array index (findRelatedField) then if the value is related to Argument/Struct Field, collect the value(collectRelatedLengthField) The value will has the attriube as ArrayLen

Source from the content-addressed store, hash-verified

314// collect the value(collectRelatedLengthField)
315// The value will has the attriube as ArrayLen
316void ArgFlow::collectRelatedLengthField(Value &V) {
317 SmallSet<Value *, 8> Visited;
318 int FieldNum = findRelatedField(V, Visited, FDInfo->Parent);
319 if (FieldNum >= 0)
320 FDInfo->SizeFields.insert(FieldNum);
321}
322
323/*
324 * Trace backward using use-def chains until we reach argument definition(s).

Callers 1

analyzeArrayLenMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected