This is an archive of the discontinued LLVM Phabricator instance.

[flang] Move SAVE attribute checks to declaration checking
ClosedPublic

Authored by klausler on Mar 21 2023, 3:10 PM.

Details

Summary

Constraint checking for explicit SAVE attributes is more
accurate when done along with other declaration checking, rather
than on the fly during name resolution. This allows us to
catch attempts to attach explicit SAVE attributes to anything
that can't have one (constraints C859, C860).

Also delete IsSave(), whose few remaining uses were changed to the
more general IsSaved() predicate that seems more correct for
those uses, returning true for both explicit and implied SAVE
attributes.

Diff Detail

Event Timeline

klausler created this revision.Mar 21 2023, 3:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2023, 3:10 PM
klausler requested review of this revision.Mar 21 2023, 3:10 PM
vdonaldson accepted this revision.Mar 21 2023, 7:54 PM
This revision is now accepted and ready to land.Mar 21 2023, 7:54 PM