This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Fix parentheses placement in GetExpressionPath
AbandonedPublic

Authored by kastiglione on Sep 15 2022, 8:32 PM.

Details

Reviewers
jingham
Summary

Adjust the placement of parentheses around a pointer dereference in
GetExpressionPath.

The comment states:

*(a_ptr).memberName, which is entirely fine

but the expression should be: (*a_ptr).memberName.

Diff Detail

Event Timeline

kastiglione created this revision.Sep 15 2022, 8:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 15 2022, 8:32 PM
kastiglione requested review of this revision.Sep 15 2022, 8:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 15 2022, 8:32 PM

I noticed this when running v *SomeVar and the variable contained a llvm::PointerUnion. The synthetic provider for PointerUnion uses GetExpressionPath.

kastiglione abandoned this revision.Sep 30 2022, 9:51 AM
kastiglione added a subscriber: tonkosi.

This was already being worked on in D132734 by @tonkosi