[Sema] Make extended vectors of `bool` an error.
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Thu, 28 Jan 2016 01:38:18 +0000 (01:38 +0000)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Thu, 28 Jan 2016 01:38:18 +0000 (01:38 +0000)
commita2f29fa694214e622ea21e6c5b541d406970bf4f
tree246c67ca0ed6d2e801897ab1d4dfdc0e9349e94a
parent502ff66967c754205c10a7ecc508b0923e33442e
[Sema] Make extended vectors of `bool` an error.

In OpenCL, `bool` vectors are a reserved type, and are therefore
illegal.

Outside of OpenCL, if we try to make an extended vector of N `bool`s,
Clang will lower it to an `[N x i1]`. LLVM has no ABI for bitvectors, so
lots of operations on such vectors are thoroughly broken. As a result,
this patch makes them illegal in everything else, as well. :)

Differential Revision: http://reviews.llvm.org/D15721

llvm-svn: 259011
clang/lib/Sema/SemaType.cpp
clang/test/CodeGen/convertvector.c
clang/test/Sema/ext_vector_casts.c
clang/test/SemaOpenCL/bool-vectors.cl [new file with mode: 0644]