================
@@ -5484,6 +5484,19 @@ bool CheckFloatOrHalfRepresentations(Sema *S, CallExpr 
*TheCall) {
                                   checkFloatorHalf);
 }
 
+bool CheckNoDoubleVectors(Sema *S, CallExpr *TheCall) {
+  auto checkDoubleVector = [](clang::QualType PassedType) -> bool {
+    if (PassedType->isVectorType() && PassedType->hasFloatingRepresentation()) 
{
+      clang::QualType BaseType =
+          PassedType->getAs<clang::VectorType>()->getElementType();
----------------
llvm-beanz wrote:

```suggestion
    if (const auto *VecTy = dyn_cast<VectorType>(PassedType)) {
      clang::QualType BaseType = VecTy->getElementType();
```
nit: `hasFloatingRepresentation` does the `dyn_cast` to `VectorType` and 
inspects the element type. It's probably more streamlined for this case since 
we care about a specific element type to just do the `dyn_cast` and check 
inline.

https://github.com/llvm/llvm-project/pull/85662
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to