hubert.reinterpretcast added inline comments.
================
Comment at: clang/lib/Sema/SemaOverload.cpp:3913
+ for (auto Type : Types) {
+ if (S.Context.getCanonicalType(Type)->getTypeClass() != Type::Vector)
+ return false;
----------------
wuzish wrote:
> hubert.reinterpretcast wrote:
> > Considering that this is a local lambda called in one place, are we
> > expecting cases where the canonical type is not something on which we can
> > call getVectorKind()? If not, then we do not need this `if`.
> Well, that's for ExtVectorType. I encounter some testcase failure because of
> that. So I just narrow the condition to only handle Type::Vector.
>
> As the following comment said, so I treat it separately.
>
> /// ExtVectorType - Extended vector type. This type is created using
> /// __attribute__((ext_vector_type(n)), where "n" is the number of elements.
> /// Unlike vector_size, ext_vector_type is only allowed on typedef's. This
> /// class enables syntactic extensions, like Vector Components for accessing
> /// points (as .xyzw), colors (as .rgba), and textures (modeled after OpenGL
> /// Shading Language).
An ExtVectorType is a VectorType, so what sort of failures are you hitting?
https://reviews.llvm.org/D53417
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits