================
@@ -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:
I meant that it would probably propagate to the intrinsic's use
https://godbolt.org/z/WxK3dzK56. I don't think it's mandatory that the
qualifiers all match and the only qualifier that makes a big difference is
const AFAIK.
https://github.com/llvm/llvm-project/pull/160185
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits