sfertile added inline comments.
================
Comment at: lib/Headers/altivec.h:15629
+#define vec_test_data_class(__a, __b) \
+ _Generic((__a), \
+ vector float: \
----------------
nemanjai wrote:
> I don't know what happens if the type of the first argument is neither of the
> two types, but I think we should verify that something sane happens. Namely,
> some sort of overload resolution error message.
We do get a decent error diagnostic:
test_data_class_bad.c:9:26: error: controlling expression type '__vector
unsigned char' (vector of 16 'unsigned char' values) not compatible with any
generic association type
vector bool int res_f = vec_test_data_class(vfa, 4);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sfertile/LLVM/publish/assert/bin/../lib/clang/4.0.0/include/altivec.h:15629:18:
note: expanded from macro 'vec_test_data_class'
_Generic((__a), \
^~~~~
1 error generated.
Repository:
rL LLVM
https://reviews.llvm.org/D26271
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits