Clang generally treats booleans as 8-bit types, but lowers them to 1-bit types. This means we currently happily accept C++ code like:
typedef __attribute__((__ext_vector_type__(4))) bool BoolVector; typedef __attribute__((__ext_vector_type__(1))) int IntVector; int main() { BoolVector bv; IntVector iv = (IntVector)bv; }
...And lower it to a cast from a [4 x i1] to a [1 x i32]. Which gives us a nice greeting in the form of an ICE.
ISTM that bools are only a valid element type in OpenCL vectors. The spec doesn't outline a definitive size for a bool (only that it must be able to support a 0 or 1), so I'm assuming that lowering to a vector of i1 is fine.