This is an archive of the discontinued LLVM Phabricator instance.

[libTooling] Change `access` stencil to recognize use of `operator*`.
ClosedPublic

Authored by ymandel on Jun 16 2021, 8:30 AM.

Details

Summary

Currently, access doesn't recognize a dereferenced smart pointer. So,
access(e, "field") where e = *x, yields:

  • x->field, for normal-pointer x,
  • (*x).field, for smart-pointer x.

This patch normalizes handling of smart pointer to match normal pointer, when
the smart pointer type supports ->.

Diff Detail

Event Timeline

ymandel requested review of this revision.Jun 16 2021, 8:30 AM
ymandel created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJun 16 2021, 8:30 AM
ymandel updated this revision to Diff 352450.Jun 16 2021, 8:31 AM

cleanup tweaks

ymandel updated this revision to Diff 352453.Jun 16 2021, 8:36 AM

add comments and simplify.

gribozavr2 accepted this revision.Jun 16 2021, 11:58 AM
This revision is now accepted and ready to land.Jun 16 2021, 11:58 AM
This revision was landed with ongoing or failed builds.Jun 16 2021, 1:34 PM
This revision was automatically updated to reflect the committed changes.