================
@@ -4189,6 +4189,14 @@ static bool CheckVectorElementsTraitOperandType(Sema &S, 
QualType T,
            << ""
            << "__builtin_vectorelements" << T << ArgRange;
 
+  if (auto *FD = dyn_cast<FunctionDecl>(S.CurContext)) {
+    if (T->isSVESizelessBuiltinType()) {
+      llvm::StringMap<bool> CallerFeatureMap;
+      S.Context.getFunctionFeatureMap(CallerFeatureMap, FD);
+      return S.ARM().checkSVETypeSupport(T, Loc, FD, CallerFeatureMap);
+    }
+  }
+
----------------
labrinea wrote:

I am looking at 
https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/Sema.cpp#L2291 
where we check the type of parameters, but I suppose builtins have no prototype 
available at that point so perhaps this (CheckVectorElementsTraitOperandType) 
is the right place to check?

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

Reply via email to