================ @@ -0,0 +1,16 @@ +// RUN: %clang_cc1 %s -fsyntax-only -verify +// expected-no-diagnostics + +// This example uncovered a bug in Sema::BuiltinVectorMath, where we should be +// using ASTContext::hasSameUnqualifiedType(). + +typedef float vec3 __attribute__((ext_vector_type(3))); + +typedef struct { + vec3 b; +} struc; + +vec3 foo(vec3 a,const struc* hi) { + vec3 b = __builtin_elementwise_max((vec3)(0.0f), a); ---------------- QiYueFeiXue wrote:
I think other builtins may have similar issues, but I tested them locally and they don't seem to be the case. I will roll back other irrelevant changes later. https://github.com/llvm/llvm-project/pull/141485 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits