This is an archive of the discontinued LLVM Phabricator instance.

[Syntax] Disallow invalid Node operations
ClosedPublic

Authored by sammccall on Oct 26 2020, 8:44 AM.

Details

Summary

Copy/move break invariants (move could be fixed).
Node/Tree should have no public constructors, they're abstract.
Destructor is private to enforce arena allocation.

(Making the constructor of all subclasses private doesn't seem worthwhile)

Diff Detail

Event Timeline

sammccall created this revision.Oct 26 2020, 8:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 26 2020, 8:44 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
sammccall requested review of this revision.Oct 26 2020, 8:44 AM
gribozavr2 accepted this revision.Oct 26 2020, 8:51 AM
This revision is now accepted and ready to land.Oct 26 2020, 8:51 AM
eduucaldas accepted this revision.Oct 26 2020, 9:06 AM
This revision was automatically updated to reflect the committed changes.