[clang] [Clang] Use private address space for builtin_alloca return type for OpenCL (PR #95750)
Alexander Richardson via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 2 13:52:20 PDT 2024
================
@@ -2210,6 +2222,9 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
case Builtin::BI__builtin_alloca_uninitialized:
Diag(TheCall->getBeginLoc(), diag::warn_alloca)
<< TheCall->getDirectCallee();
+ if (getLangOpts().OpenCL) {
+ builtinAllocaAddrSpace(*this, TheCall);
+ }
----------------
arichardson wrote:
A bit late tot this review, but right now we have `getASTAllocaAddressSpace()` in CodeGen/, could this be used moved so we can make use of it in Sema instead?
https://github.com/llvm/llvm-project/pull/95750
More information about the cfe-commits
mailing list