[all-commits] [llvm/llvm-project] 4ece6f: [Sema][SVE] Reject "delete" with sizeless types

rsandifo-arm via All-commits all-commits at lists.llvm.org
Tue Mar 17 05:51:18 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4ece6f051bd088fb8d4862bedf590f4f9d86cd17
      https://github.com/llvm/llvm-project/commit/4ece6f051bd088fb8d4862bedf590f4f9d86cd17
  Author: Richard Sandiford <richard.sandiford at arm.com>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/test/SemaCXX/sizeless-1.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list