HomePhabricator

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

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

Description

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

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.

Differential Revision: https://reviews.llvm.org/D76219

Details