This is an archive of the discontinued LLVM Phabricator instance.

[AST] Rename some Redeclarable functions to reduce confusion
ClosedPublic

Authored by MaskRay on Jul 3 2018, 1:29 PM.

Diff Detail

Repository
rC Clang

Event Timeline

MaskRay created this revision.Jul 3 2018, 1:29 PM
Eugene.Zelenko added a project: Restricted Project.
rsmith added inline comments.Jul 3 2018, 7:25 PM
include/clang/AST/Redeclarable.h
106

I think this is still a confusing name, because it points either to the previous declaration or to the latest one. How about just calling this Link? Or if you want to be more explicit, PrevOrLatest. (But that name is still slightly inaccurate due to the UninitializedLatest case.)

121–124

This would be simpler and more obvious as:

return Prev.is<KnownLatest>() ||
       // FIXME: 'template' is required on the next line due to an
       // apparent clang bug.
       Prev.get<NotKnownLatest>().template is<UninitializedLatest>());
MaskRay updated this revision to Diff 154044.Jul 3 2018, 8:07 PM

Rename Next to Link as per rsmith

MaskRay marked 2 inline comments as done.Jul 3 2018, 8:23 PM
rsmith accepted this revision.Jul 9 2018, 11:34 AM
This revision is now accepted and ready to land.Jul 9 2018, 11:34 AM
This revision was automatically updated to reflect the committed changes.