This is an archive of the discontinued LLVM Phabricator instance.

[flang] Use X->foo() instead of X.getValue().foo() (NFC)
ClosedPublic

Authored by kazu on Jul 22 2022, 11:56 PM.

Details

Summary

Flang C++ Style Guide tells us to use *X when the reference is
protected by a presense test. However, (*X).foo() is a little harder
to read, especially when X is a complicated expression.

This patch slightly deviates from the guide (but retains the spirit)
by using X->foo() instead.

Diff Detail

Event Timeline

kazu created this revision.Jul 22 2022, 11:56 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 22 2022, 11:56 PM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
kazu requested review of this revision.Jul 22 2022, 11:56 PM
clementval accepted this revision.Jul 25 2022, 12:17 AM
This revision is now accepted and ready to land.Jul 25 2022, 12:17 AM
This revision was automatically updated to reflect the committed changes.