[all-commits] [llvm/llvm-project] 578fb2: [Sema][SVE] Allow ?: to select between SVE types in C

rsandifo-arm via All-commits all-commits at lists.llvm.org
Wed Mar 25 03:52:01 PDT 2020


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

  Changed paths:
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/Sema/sizeless-1.c

  Log Message:
  -----------
  [Sema][SVE] Allow ?: to select between SVE types in C

When compiling C, a ?: between two values of the same SVE type
currently gives an error such as:

  incompatible operand types ('svint8_t' (aka '__SVInt8_t') and 'svint8_t')

It's supposed to be valid to select between (cv-qualified versions of)
the same SVE type, so this patch adds that case.

These expressions already work for C++ and are tested by
SemaCXX/sizeless-1.cpp.

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




More information about the All-commits mailing list