[PATCH] D24472: [Sema] Support lax conversions for compound assignments
Akira Hatanaka via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 21 07:51:56 PDT 2016
ahatanak added a comment.
Thanks Bruno. I have a couple more questions.
Comment at: lib/Sema/SemaExpr.cpp:8090
@@ +8089,3 @@
+ *RHSExpr = ImpCastExprToType(RHSExpr->get(), LHSType, CK_BitCast);
+ return VecType;
Sorry I wasn't clear, but I was asking whether you were planning to allow the following conversions for compound statements.
typedef short s4 __attribute__ ((vector_size(8)));
typedef int i2 __attribute__ ((vector_size(8)));
a = a + b; // clang accepts this.
a += b; // currently clang rejects this.
Also, I feel clang is inconsistent in warning about incompatible types. In the following example, it issues a warning for the first line, but is silent about the second line:
a = b + a; // incompatible vector types warning
a = a + b; // no warning
I don't think we have to fix everything in this patch, but just wanted to know what your thoughts were.
More information about the cfe-commits