[all-commits] [llvm/llvm-project] 627b5c: [Sema][SVE] Reject aligned/_Alignas for sizeless t...

rsandifo-arm via All-commits all-commits at lists.llvm.org
Thu Mar 12 10:19:33 PDT 2020


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

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

  Log Message:
  -----------
  [Sema][SVE] Reject aligned/_Alignas for sizeless types

A previous patch rejected alignof for sizeless types.  This patch
extends that to cover the "aligned" attribute and _Alignas.  Since
sizeless types are not meant to be used for long-term data, cannot
be used in aggregates, and cannot have static storage duration,
there shouldn't be any need to fiddle with their alignment.

Like with alignof, this is a conservative position that can be
relaxed in future if it turns out to be too restrictive.

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




More information about the All-commits mailing list