================
@@ -4742,6 +4742,12 @@ bool Sema::CheckUnaryExprOrTypeTraitOperand(QualType 
ExprType,
   if (ExprType->isDependentType())
     return false;
 
+  // A reference to a vector type is not a vector type; check this before the
+  // reference is looked through below.
+  if (ExprKind == UETT_VectorElements)
+    return CheckVectorElementsTraitOperandType(*this, ExprType, OpLoc,
----------------
akash-manna-sky wrote:

I audited a quick for the rest: `sizeof`/`alignof` are spec'd for references 
and the evaluator strips them itself, `__builtin_omp_required_simd_align` only 
looks at the target, and `_Countof` is C-only.

`vec_step` and ptrauth do have the same issue, just silent: `vec_step(float4&)` 
returns 1 instead of 4 in C++ for OpenCL, and 
`__builtin_ptrauth_type_discriminator(void (S::*&)())` gives a different value 
than the pointee. Both pre-existing I believe.  What do you think?


https://github.com/llvm/llvm-project/pull/219767
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to