[clang] [Clang][FIX] Fix type qualifiers on vector builtins (PR #160185)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 25 12:23:41 PDT 2025
================
@@ -2428,6 +2435,11 @@ static ExprResult BuiltinMaskedScatter(Sema &S, CallExpr *TheCall) {
QualType PtrTy = PtrArg->getType();
QualType PointeeTy = PtrTy->getPointeeType();
+ if (PtrTy->getPointeeType().isConstQualified())
+ return ExprError(
+ S.Diag(PtrArg->getExprLoc(), diag::err_typecheck_assign_const)
+ << /*read-only*/ 5);
----------------
jhuber6 wrote:
Hopefully this is what you had in mind, I basically just check for address spaces, atomic, volatile, and const now since I believe the others are not applicable like you said..
https://github.com/llvm/llvm-project/pull/160185
More information about the cfe-commits
mailing list