[all-commits] [llvm/llvm-project] b50d80: [Sema][SVE] Don't allow fields to have sizeless type

rsandifo-arm via All-commits all-commits at lists.llvm.org
Fri Mar 13 12:23:16 PDT 2020


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

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaLambda.cpp
    M clang/test/Sema/sizeless-1.c
    M clang/test/SemaCXX/sizeless-1.cpp

  Log Message:
  -----------
  [Sema][SVE] Don't allow fields to have sizeless type

The SVE ACLE doesn't allow fields to have sizeless type.  At the moment
clang accepts things like:

  struct s { __SVInt8_t x; } y;

but trying to code-generate it leads to LLVM asserts like:

  llvm/include/llvm/Support/TypeSize.h:126: uint64_t llvm::TypeSize::getFixedSize() const: Assertion `!IsScalable && "Request for a fixed size on a scalable object"' failed.

This patch adds an associated clang diagnostic.

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




More information about the All-commits mailing list