vbyakovlcl added inline comments.

================
Comment at: llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td:2306
+  "vector operands do not have the same elements sizes (%0 and %1)">,
+  InGroup<DiagGroup<"gnu-vec-elem-size">>, DefaultError;
 def err_ext_vector_component_exceeds_length : Error<
----------------
bruno wrote:
> Although the motivation is to support the same warning present in GCC, I 
> think this is helpful enough anyway so that we might skip calling it 
> "gnu-vec-elem-size" and have a more generic name instead? How about plain 
> "vec-elem-size"?
I'm agree.


================
Comment at: llvm/tools/clang/lib/Sema/SemaExpr.cpp:8787
     }
+    if (!S.LangOpts.OpenCL && !S.LangOpts.ZVector) {
+      const BuiltinType *LHSBT = LHSEleType->getAs<clang::BuiltinType>();
----------------
bruno wrote:
> Besides `__ext_vector_type__`, would this also trigger for `vector_size`? 
> Right now this is an error for `vector_size` primarily because the number of 
> elements is different, can you confirm this won't change?
I compare vector element sizes, so there must not be any differencies caused by 
different triggers. I added additional type definitions to the tests. All 
compiles fain.


https://reviews.llvm.org/D24669



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to