[all-commits] [llvm/llvm-project] 69ab8b: [Sema][SVE] Fix handling of initialisers for built...

rsandifo-arm via All-commits all-commits at lists.llvm.org
Wed May 6 04:31:23 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 69ab8b46b84daa42f334ea2dc7a097f7b81bae77
      https://github.com/llvm/llvm-project/commit/69ab8b46b84daa42f334ea2dc7a097f7b81bae77
  Author: Richard Sandiford <richard.sandiford at arm.com>
  Date:   2020-05-06 (Wed, 06 May 2020)

  Changed paths:
    M clang/docs/DiagnosticsReference.rst
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaInit.cpp
    M clang/test/Sema/sizeless-1.c
    M clang/test/SemaCXX/sizeless-1.cpp

  Log Message:
  -----------
  [Sema][SVE] Fix handling of initialisers for built-in SVE types

The built-in SVE types are supposed to be treated as opaque types.
This means that for initialisation purposes they should be treated
as a single unit, much like a scalar type.

However, as Eli pointed out, actually using "scalar" in the diagnostics
is likely to cause confusion, given the types are logically vectors.
The patch therefore uses custom diagnostics or generalises existing
ones.  Some of the messages use the word "indivisible" to try to make
it clear(er) that these types can't be initialised elementwise.

I don't think it's possible to trigger warn_braces_around_(scalar_)init
for sizeless types as things stand, since the types can't be used as
members or elements of more complex types.  But it seemed better to be
consistent with ext_many_braces_around_(scalar_)init, so the patch
changes it anyway.

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




More information about the All-commits mailing list