Skip to content

VariableRenaming::expandMemberUses

Expand all member uses (chained names) to explicitly use every name in the chain.

Synopsis

Declared in <src/midend/programAnalysis/variableRenaming/VariableRenaming.h>

bool
expandMemberUses(cfgNode curNode);

Description

When a member of a struct/class is used, this will insert uses for every member referenced to access the currently used one.

ex. Obj o; //Declare o of type Obj int i; //Declare i of type int i = o.a.b; //Def for i, use for o.a.b

In the third line, this function will insert the following:

i = o.a.b; //Def for i, use for o.a.b, o.a, o

Return Value

Whether any new uses were inserted.

Created with MrDocs