Skip to content
Commit 506406c4 authored by Richard Sandiford's avatar Richard Sandiford
Browse files

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

new-expressions for a type T require sizeof(T) to be computable,
so the SVE ACLE does not allow them for sizeless types.  At the moment:

  auto f() { return new __SVInt8_t; }

creates a call to operator new with a zero size:

  %call = call noalias nonnull i8* @_Znwm(i64 0)

This patch reports an appropriate error instead.

Differential Revision: https://reviews.llvm.org/D76218
parent 7c6e52ac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment