This change fixes two issues in ValueObject::GetExpressionPath method:
- Accessing members of struct references used to produce expression paths such as "str.&str.member" (instead of the expected "str.member"). This is fixed by assigning the flag tha the child value is a dereference when calling Dereference() on references and adjusting logic in expression path creation.
- If the parent of member access is dereference, the produced expression path was "*(ptr).member". This is incorrect, since it dereferences the member instead of the pointer. This is fixed by wrapping dereference expression into parenthesis, resulting with "(*ptr).member".
I am *absolutely* not an expert here but I've spent several hours trying to debug why this incredibly thorough, well-written patch does not handle the case in TestArray.py. It would seem to me that this is the check that we forgot to bring over in to the new logic. I was attempting to be able to have an updated version of the patch by tonight, but didn't get further than just debugging. I will continue to work on it -- I am sure that you gurus have other, more important things to work on.
That said, I am just trying to help so if I am totally off base, please let me know!
Sincerely,
Will