This is an archive of the discontinued LLVM Phabricator instance.

[Sema][SVE] Reject "delete" with sizeless types
ClosedPublic

Authored by rsandifo-arm on Mar 16 2020, 3:03 AM.

Details

Summary

Sizeless types can't be used with "new", so it doesn't make sense
to use them with "delete" either. The SVE ACLE therefore doesn't
allow that.

This is slightly stronger than for normal incomplete types, since:

struct S;
void f(S *s) { delete s; }

is (by necessity) just a default-on warning rather than an error.

Diff Detail

Event Timeline

rsandifo-arm created this revision.Mar 16 2020, 3:03 AM
Herald added a project: Restricted Project. · View Herald Transcript
This revision is now accepted and ready to land.Mar 16 2020, 11:46 AM
This revision was automatically updated to reflect the committed changes.